erp_invoicing 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/models/extensions/party.rb +15 -3
- data/app/models/invoice.rb +33 -1
- data/app/models/invoice_party_role.rb +16 -0
- data/app/models/payment_application.rb +17 -1
- data/lib/erp_invoicing/engine.rb +1 -1
- data/lib/erp_invoicing/version.rb +6 -2
- metadata +31 -234
- data/app/assets/javascripts/erp_invoicing/application.js +0 -9
- data/app/assets/stylesheets/erp_invoicing/application.css +0 -7
- data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/accounts_controller.rb +0 -166
- data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/base_controller.rb +0 -22
- data/app/controllers/erp_invoicing/erp_app/shared/billing_accounts_controller.rb +0 -111
- data/app/controllers/erp_invoicing/erp_app/shared/files_controller.rb +0 -52
- data/app/controllers/erp_invoicing/erp_app/shared/invoices_controller.rb +0 -208
- data/app/controllers/erp_invoicing/sms_controller.rb +0 -156
- data/app/helpers/erp_invoicing/application_helper.rb +0 -4
- data/app/views/layouts/erp_invoicing/application.html.erb +0 -14
- data/db/data_migrations/20111121153349_create_bill_pay_organizer_application.rb +0 -14
- data/db/data_migrations/20120118181839_create_invoice_management_desktop_application.rb +0 -26
- data/db/data_migrations/20120229174322_add_billpay_widget.rb +0 -26
- data/public/javascripts/erp_app/desktop/applications/invoice_management/billing_accounts_panel.js +0 -79
- data/public/javascripts/erp_app/desktop/applications/invoice_management/invoices_panel.js +0 -48
- data/public/javascripts/erp_app/desktop/applications/invoice_management/module.js +0 -36
- data/public/javascripts/erp_app/organizer/applications/bill_pay/base.js +0 -146
- data/public/javascripts/erp_app/organizer/applications/bill_pay/extensions.js +0 -21
- data/public/javascripts/erp_app/organizer/applications/bill_pay/make_payment_window.js +0 -109
- data/public/javascripts/erp_app/organizer/applications/bill_pay/payment_accounts_grid_panel.js +0 -105
- data/public/javascripts/erp_app/organizer/applications/bill_pay/transactions_grid_panel.js +0 -84
- data/public/javascripts/erp_app/shared/add_invoice_window.js +0 -220
- data/public/javascripts/erp_app/shared/billing_accounts_grid_panel.js +0 -316
- data/public/javascripts/erp_app/shared/invoice_items_grid_panel.js +0 -152
- data/public/javascripts/erp_app/shared/invoices_grid_panel.js +0 -361
- data/public/javascripts/erp_app/shared/payments_grid_panel.js +0 -74
- data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +0 -28
- data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +0 -16
- data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
- data/spec/dummy/db/data_migrations/20110324010232_product_role_types.erp_products.rb +0 -24
- data/spec/dummy/db/data_migrations/20110509223702_add_publisher_role.knitkit.rb +0 -22
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
- data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +0 -27
- data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +0 -24
- data/spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb +0 -33
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
- data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +0 -252
- data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +0 -26
- data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +0 -26
- data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +0 -15
- data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +0 -53
- data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
- data/spec/dummy/db/data_migrations/20110816153456_add_knitkit_application.knitkit.rb +0 -32
- data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +0 -21
- data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +0 -32
- data/spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb +0 -19
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
- data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +0 -23
- data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +0 -42
- data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
- data/spec/dummy/db/data_migrations/20111118182910_setup_knitkit_capabilities.knitkit.rb +0 -128
- data/spec/dummy/db/data_migrations/20111121153349_create_bill_pay_organizer_application.erp_invoicing.rb +0 -15
- data/spec/dummy/db/data_migrations/20120109173616_create_download_capability_type.erp_tech_svcs.rb +0 -14
- data/spec/dummy/db/data_migrations/20120118181839_create_invoice_management_desktop_application.erp_invoicing.rb +0 -27
- data/spec/dummy/db/data_migrations/20120127144444_create_website_role_types.knitkit.rb +0 -14
- data/spec/dummy/db/data_migrations/20120127150505_create_website_default_configuration.knitkit.rb +0 -73
- data/spec/dummy/db/data_migrations/20120127150506_add_primary_host_to_website_configuration.knitkit.rb +0 -34
- data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +0 -29
- data/spec/dummy/db/data_migrations/20120229174322_add_billpay_widget.erp_invoicing.rb +0 -27
- data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +0 -29
- data/spec/dummy/db/data_migrations/20120316150424_add_is_template_to_default_website_config.knitkit.rb +0 -17
- data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +0 -11
- data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +0 -19
- data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +0 -23
- data/spec/dummy/db/data_migrations/20120605154637_add_calculate_balance_strategy_types.erp_invoicing.rb +0 -21
- data/spec/dummy/db/data_migrations/20120809020508_update_website_and_configuration.knitkit.rb +0 -78
- data/spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb +0 -67
- data/spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb +0 -65
- data/spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb +0 -27
- data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
- data/spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb +0 -21
- data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +0 -16
- data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
- data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +0 -23
- data/spec/dummy/db/migrate/20121214000230_base_erp_services.erp_base_erp_svcs.rb +0 -461
- data/spec/dummy/db/migrate/20121214000231_base_tech_services.erp_tech_svcs.rb +0 -255
- data/spec/dummy/db/migrate/20121214000232_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
- data/spec/dummy/db/migrate/20121214000233_base_app_framework.erp_app.rb +0 -276
- data/spec/dummy/db/migrate/20121214000234_dynamic_forms.erp_forms.rb +0 -95
- data/spec/dummy/db/migrate/20121214000235_create_tickets.erp_forms.rb +0 -19
- data/spec/dummy/db/migrate/20121214000236_upgrade_dynamic_forms_table.erp_forms.rb +0 -32
- data/spec/dummy/db/migrate/20121214000237_setup_knitkit.knitkit.rb +0 -316
- data/spec/dummy/db/migrate/20121214000238_invoicing_services.erp_invoicing.rb +0 -277
- data/spec/dummy/db/migrate/20121214000239_base_inventory.erp_inventory.rb +0 -91
- data/spec/dummy/db/migrate/20121214000240_base_inventory_indexes.erp_inventory.rb +0 -48
- data/spec/dummy/db/migrate/20121214000241_base_txns_and_accts.erp_txns_and_accts.rb +0 -364
- data/spec/dummy/db/migrate/20121214000242_agreements_services.erp_agreements.rb +0 -160
- data/spec/dummy/db/migrate/20121214000243_agreements_services_indexes.erp_agreements.rb +0 -52
- data/spec/dummy/db/migrate/20121214000244_base_orders.erp_orders.rb +0 -178
- data/spec/dummy/db/migrate/20121214000245_base_products.erp_products.rb +0 -234
- data/spec/dummy/db/migrate/20121214000246_base_products_indexes.erp_products.rb +0 -59
- data/spec/dummy/db/migrate/20121214000247_erp_commerce_base.erp_commerce.rb +0 -442
- data/spec/dummy/db/migrate/20121214000248_base_work_efforts.erp_work_effort.rb +0 -211
- data/spec/dummy/db/migrate/20130107181155_create_groups.erp_tech_svcs.rb +0 -19
- data/spec/dummy/db/migrate/20130107181156_upgrade_security.erp_tech_svcs.rb +0 -54
- data/spec/dummy/db/migrate/20130107181157_upgrade_security2.erp_tech_svcs.rb +0 -270
- data/spec/dummy/db/schema.rb +0 -2569
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +0 -64744
@@ -1,361 +0,0 @@
|
|
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
|
-
extraPostData:{}
|
9
|
-
});
|
10
|
-
uploadWindow.show();
|
11
|
-
},
|
12
|
-
|
13
|
-
emailInvoice : function(rec){
|
14
|
-
var emailInvoiceWindow = Ext.create("Ext.window.Window",{
|
15
|
-
title:'Email Invoice',
|
16
|
-
plain: true,
|
17
|
-
buttonAlign:'center',
|
18
|
-
items: {
|
19
|
-
xtype: 'form',
|
20
|
-
labelWidth: 110,
|
21
|
-
frame:false,
|
22
|
-
bodyStyle:'padding:5px 5px 0',
|
23
|
-
width: 425,
|
24
|
-
url:'/erp_invoicing/erp_app/shared/invoices/email_invoice',
|
25
|
-
defaults: {
|
26
|
-
width: 225
|
27
|
-
},
|
28
|
-
items: [
|
29
|
-
{
|
30
|
-
xtype:'textfield',
|
31
|
-
fieldLabel:'Email Address',
|
32
|
-
allowBlank:false,
|
33
|
-
width:400,
|
34
|
-
name:'to_email'
|
35
|
-
},
|
36
|
-
{
|
37
|
-
xtype:'hiddenfield',
|
38
|
-
name:'id',
|
39
|
-
value:rec.get('id')
|
40
|
-
}
|
41
|
-
]
|
42
|
-
},
|
43
|
-
buttons: [{
|
44
|
-
text:'Submit',
|
45
|
-
listeners:{
|
46
|
-
'click':function(button){
|
47
|
-
var window = button.findParentByType('window');
|
48
|
-
var formPanel = window.query('form')[0];
|
49
|
-
formPanel.getForm().submit({
|
50
|
-
waitMsg:'Emailing Invoice',
|
51
|
-
reset:true,
|
52
|
-
success:function(form, action){
|
53
|
-
var obj = Ext.decode(action.response.responseText);
|
54
|
-
if(obj.success){
|
55
|
-
emailInvoiceWindow.close();
|
56
|
-
Ext.Msg.alert("Success", 'Email has been sent.');
|
57
|
-
}
|
58
|
-
else{
|
59
|
-
Ext.Msg.alert("Error", 'Error sending email.');
|
60
|
-
}
|
61
|
-
},
|
62
|
-
failure:function(form, action){
|
63
|
-
Ext.Msg.alert("Error", 'Error sending email.');
|
64
|
-
}
|
65
|
-
});
|
66
|
-
}
|
67
|
-
}
|
68
|
-
},{
|
69
|
-
text: 'Close',
|
70
|
-
handler: function(){
|
71
|
-
emailInvoiceWindow.close();
|
72
|
-
}
|
73
|
-
}]
|
74
|
-
});
|
75
|
-
emailInvoiceWindow.show();
|
76
|
-
},
|
77
|
-
|
78
|
-
sendSmsNotification : function(rec){
|
79
|
-
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to send a SMS notification', function(btn){
|
80
|
-
if(btn == 'no'){
|
81
|
-
return false;
|
82
|
-
}
|
83
|
-
else
|
84
|
-
if(btn == 'yes')
|
85
|
-
{
|
86
|
-
var waitMsg = Ext.Msg.wait('Status','Sending SMS notification...');
|
87
|
-
|
88
|
-
Ext.Ajax.request({
|
89
|
-
url: '/erp_invoicing/erp_app/shared/invoices/sms_notification',
|
90
|
-
method: 'POST',
|
91
|
-
params:{
|
92
|
-
id:rec.get('id')
|
93
|
-
},
|
94
|
-
success: function(response) {
|
95
|
-
waitMsg.close();
|
96
|
-
var obj = Ext.decode(response.responseText);
|
97
|
-
if(obj.success){
|
98
|
-
Ext.Msg.alert('Success', 'SMS notification sent.');
|
99
|
-
}
|
100
|
-
else{
|
101
|
-
Ext.Msg.alert('Error', 'Could not send notification');
|
102
|
-
}
|
103
|
-
},
|
104
|
-
failure: function(response) {
|
105
|
-
waitMsg.close();
|
106
|
-
Ext.Msg.alert('Error', 'Could not send notification');
|
107
|
-
}
|
108
|
-
});
|
109
|
-
}
|
110
|
-
});
|
111
|
-
},
|
112
|
-
|
113
|
-
initComponent : function(){
|
114
|
-
this.callParent(this.arguemnts);
|
115
|
-
},
|
116
|
-
|
117
|
-
constructor : function(config) {
|
118
|
-
var self = this;
|
119
|
-
|
120
|
-
var store = Ext.create('Ext.data.Store', {
|
121
|
-
fields:['billed_to_party', 'billed_from_party', 'invoice_number','description', 'message', 'invoice_date', 'due_date', {name:'payment_due',type:'float'}, 'id', 'billing_account'],
|
122
|
-
autoLoad: Compass.ErpApp.Utility.isBlank(config['autoLoad']) ? true : config['autoLoad'],
|
123
|
-
autoSync: true,
|
124
|
-
proxy: {
|
125
|
-
type: 'ajax',
|
126
|
-
url:'/erp_invoicing/erp_app/shared/invoices/invoices',
|
127
|
-
extraParams:{
|
128
|
-
invoice_number:null,
|
129
|
-
billing_account_id:config.billingAccountId
|
130
|
-
},
|
131
|
-
reader: {
|
132
|
-
type: 'json',
|
133
|
-
successProperty: 'success',
|
134
|
-
idProperty: 'id',
|
135
|
-
root: 'invoices',
|
136
|
-
totalProperty:'totalCount',
|
137
|
-
messageProperty: 'messages'
|
138
|
-
},
|
139
|
-
listeners: {
|
140
|
-
exception: function(proxy, response, operation){
|
141
|
-
Ext.MessageBox.show({
|
142
|
-
title: 'REMOTE EXCEPTION',
|
143
|
-
msg: 'Error performing action please try again.',
|
144
|
-
icon: Ext.MessageBox.ERROR,
|
145
|
-
buttons: Ext.Msg.OK
|
146
|
-
});
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
});
|
151
|
-
|
152
|
-
var tbar = {
|
153
|
-
items:[]
|
154
|
-
};
|
155
|
-
if(config.showAddDelete){
|
156
|
-
tbar.items.push({
|
157
|
-
text: 'Add',
|
158
|
-
xtype:'button',
|
159
|
-
iconCls: 'icon-add',
|
160
|
-
handler: function(button) {
|
161
|
-
var grid = button.up('shared-invoicesgridpanel');
|
162
|
-
var win = Ext.create("widget.shared-addinvoicewindow",{
|
163
|
-
billingAccountNumber:grid.billingAccountNumber,
|
164
|
-
billingAccountId:grid.billingAccountId,
|
165
|
-
listeners:{
|
166
|
-
'create_success':function(){
|
167
|
-
store.load();
|
168
|
-
}
|
169
|
-
}
|
170
|
-
});
|
171
|
-
win.show();
|
172
|
-
}
|
173
|
-
});
|
174
|
-
tbar.items.push('-');
|
175
|
-
tbar.items.push({
|
176
|
-
text: 'Delete',
|
177
|
-
type:'button',
|
178
|
-
iconCls: 'icon-delete',
|
179
|
-
handler: function(button) {
|
180
|
-
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this invoice?', function(btn){
|
181
|
-
if(btn == 'no'){
|
182
|
-
return false;
|
183
|
-
}
|
184
|
-
else
|
185
|
-
{
|
186
|
-
var selection = self.getView().getSelectionModel().getSelection()[0];
|
187
|
-
if (selection) {
|
188
|
-
store.remove(selection);
|
189
|
-
}
|
190
|
-
}
|
191
|
-
});
|
192
|
-
}
|
193
|
-
});
|
194
|
-
tbar.items.push('|');
|
195
|
-
}
|
196
|
-
|
197
|
-
tbar.items = tbar.items.concat([
|
198
|
-
'<span class="x-btn-inner">Invoice Number:</span>',
|
199
|
-
{
|
200
|
-
xtype:'numberfield',
|
201
|
-
hideLabel:true,
|
202
|
-
itemId:'invoiceNumberSearchNumberField'
|
203
|
-
},
|
204
|
-
{
|
205
|
-
text:'Search',
|
206
|
-
iconCls:'icon-search',
|
207
|
-
handler:function(btn){
|
208
|
-
var grid = btn.up('shared-invoicesgridpanel');
|
209
|
-
var invoiceNumber = grid.query('#invoiceNumberSearchNumberField').first().getValue();
|
210
|
-
grid.store.proxy.extraParams.invoice_number = invoiceNumber;
|
211
|
-
grid.store.load();
|
212
|
-
}
|
213
|
-
},
|
214
|
-
'|',
|
215
|
-
{
|
216
|
-
text: 'All',
|
217
|
-
xtype:'button',
|
218
|
-
iconCls: 'icon-eye',
|
219
|
-
handler: function(btn) {
|
220
|
-
var grid = btn.up('shared-invoicesgridpanel');
|
221
|
-
grid.store.proxy.extraParams.invoice_number = null;
|
222
|
-
grid.store.load();
|
223
|
-
}
|
224
|
-
},
|
225
|
-
]);
|
226
|
-
|
227
|
-
config = Ext.apply({
|
228
|
-
columns: [
|
229
|
-
{
|
230
|
-
header:'Invoice Number',
|
231
|
-
sortable: true,
|
232
|
-
dataIndex: 'invoice_number',
|
233
|
-
editor:{
|
234
|
-
xtype:'numberfield'
|
235
|
-
}
|
236
|
-
},
|
237
|
-
{
|
238
|
-
header:'Description',
|
239
|
-
width:300,
|
240
|
-
sortable: true,
|
241
|
-
dataIndex: 'description'
|
242
|
-
},
|
243
|
-
{
|
244
|
-
header:'Message',
|
245
|
-
width:250,
|
246
|
-
sortable: true,
|
247
|
-
dataIndex: 'message'
|
248
|
-
},
|
249
|
-
{
|
250
|
-
header:'Invoice Date',
|
251
|
-
sortable: true,
|
252
|
-
width:100,
|
253
|
-
dataIndex: 'invoice_date',
|
254
|
-
renderer: Ext.util.Format.dateRenderer('m/d/Y'),
|
255
|
-
editor:{
|
256
|
-
xtype:'datefield'
|
257
|
-
}
|
258
|
-
},
|
259
|
-
{
|
260
|
-
header:'Due Date',
|
261
|
-
sortable: true,
|
262
|
-
width:100,
|
263
|
-
dataIndex: 'due_date',
|
264
|
-
renderer: Ext.util.Format.dateRenderer('m/d/Y'),
|
265
|
-
editor:{
|
266
|
-
xtype:'datefield'
|
267
|
-
}
|
268
|
-
},
|
269
|
-
{
|
270
|
-
header:'Payment Due',
|
271
|
-
sortable: false,
|
272
|
-
width:100,
|
273
|
-
dataIndex: 'payment_due',
|
274
|
-
renderer:function(v){
|
275
|
-
return v.toFixed(2);
|
276
|
-
}
|
277
|
-
},
|
278
|
-
{
|
279
|
-
header:'Billing Account',
|
280
|
-
sortable: false,
|
281
|
-
width:100,
|
282
|
-
dataIndex: 'billing_account'
|
283
|
-
},
|
284
|
-
// {
|
285
|
-
// header:'Billed To',
|
286
|
-
// sortable: false,
|
287
|
-
// width:100,
|
288
|
-
// dataIndex: 'billed_to_party'
|
289
|
-
// },
|
290
|
-
// {
|
291
|
-
// header:'Billed From',
|
292
|
-
// sortable: false,
|
293
|
-
// width:100,
|
294
|
-
// dataIndex: 'billed_from_party'
|
295
|
-
// },
|
296
|
-
{
|
297
|
-
menuDisabled:true,
|
298
|
-
resizable:false,
|
299
|
-
xtype:'actioncolumn',
|
300
|
-
header:'SMS Notify',
|
301
|
-
align:'center',
|
302
|
-
width:100,
|
303
|
-
items:[{
|
304
|
-
icon:'/images/icons/message/message_16x16.png',
|
305
|
-
tooltip:'Send SMS notification',
|
306
|
-
handler :function(grid, rowIndex, colIndex){
|
307
|
-
var rec = grid.getStore().getAt(rowIndex);
|
308
|
-
self.sendSmsNotification(rec);
|
309
|
-
}
|
310
|
-
}]
|
311
|
-
},
|
312
|
-
{
|
313
|
-
menuDisabled:true,
|
314
|
-
resizable:false,
|
315
|
-
xtype:'actioncolumn',
|
316
|
-
header:'Email Invoice',
|
317
|
-
align:'center',
|
318
|
-
width:100,
|
319
|
-
items:[{
|
320
|
-
icon:'/images/icons/document/document_16x16.png',
|
321
|
-
tooltip:'Email Invoice',
|
322
|
-
handler :function(grid, rowIndex, colIndex){
|
323
|
-
var rec = grid.getStore().getAt(rowIndex);
|
324
|
-
self.emailInvoice(rec);
|
325
|
-
}
|
326
|
-
}]
|
327
|
-
},
|
328
|
-
{
|
329
|
-
menuDisabled:true,
|
330
|
-
resizable:false,
|
331
|
-
xtype:'actioncolumn',
|
332
|
-
header:'Add Document',
|
333
|
-
align:'center',
|
334
|
-
width:100,
|
335
|
-
items:[{
|
336
|
-
icon:'/images/icons/add/add_16x16.png',
|
337
|
-
tooltip:'Add Document',
|
338
|
-
handler :function(grid, rowIndex, colIndex){
|
339
|
-
var rec = grid.getStore().getAt(rowIndex);
|
340
|
-
self.addDocument(rec);
|
341
|
-
}
|
342
|
-
}]
|
343
|
-
}
|
344
|
-
],
|
345
|
-
store:store,
|
346
|
-
loadMask: true,
|
347
|
-
autoScroll:true,
|
348
|
-
stripeRows: true,
|
349
|
-
tbar:tbar,
|
350
|
-
bbar:Ext.create("Ext.PagingToolbar",{
|
351
|
-
pageSize:50,
|
352
|
-
store:store,
|
353
|
-
displayInfo: true,
|
354
|
-
displayMsg: '{0} - {1} of {2}',
|
355
|
-
emptyMsg: "Empty"
|
356
|
-
})
|
357
|
-
}, config);
|
358
|
-
|
359
|
-
this.callParent([config]);
|
360
|
-
}
|
361
|
-
});
|
@@ -1,74 +0,0 @@
|
|
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
|
-
});
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# This migration comes from erp_commerce (originally 20101011152441)
|
2
|
-
class PaymentGatewayActions
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
PaymentGatewayAction.create(
|
6
|
-
:internal_identifier => 'capture',
|
7
|
-
:description => 'capture'
|
8
|
-
)
|
9
|
-
|
10
|
-
PaymentGatewayAction.create(
|
11
|
-
:internal_identifier => 'authorize',
|
12
|
-
:description => 'Authorize'
|
13
|
-
)
|
14
|
-
|
15
|
-
PaymentGatewayAction.create(
|
16
|
-
:internal_identifier => 'full_reverse_of_authorization',
|
17
|
-
:description => 'Full Reverse Of Authorization'
|
18
|
-
)
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.down
|
22
|
-
['sale','void_sale','authorize'].each do |iid|
|
23
|
-
type = PaymentGatewayAction.find_by_internal_identifier(iid)
|
24
|
-
type.destroy unless type.nil?
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This migration comes from erp_txns_and_accts (originally 20101014142230)
|
2
|
-
class FinancialTxnTypes
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
BizTxnType.create(
|
6
|
-
:description => "Payment Transaction",
|
7
|
-
:internal_identifier => 'payment_txn'
|
8
|
-
)
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.down
|
12
|
-
type = BizTxnType.iid('payment_txn')
|
13
|
-
type.destroy unless type.nil?
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# This migration comes from erp_tech_svcs (originally 20110109173616)
|
2
|
-
class CreateCapabilityScopeTypes
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
CapabilityType.create(:internal_identifier => 'download', :description => 'Download') if CapabilityType.where("internal_identifier = 'download'").first.nil?
|
6
|
-
|
7
|
-
ScopeType.create(:description => 'Instance', :internal_identifier => 'instance') if ScopeType.where("internal_identifier = 'instance'").first.nil?
|
8
|
-
ScopeType.create(:description => 'Class', :internal_identifier => 'class') if ScopeType.where("internal_identifier = 'class'").first.nil?
|
9
|
-
ScopeType.create(:description => 'Query', :internal_identifier => 'query') if ScopeType.where("internal_identifier = 'query'").first.nil?
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# This migration comes from erp_products (originally 20110324010232)
|
2
|
-
class ProductRoleTypes
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
ProdTypeRelnType.create(:internal_identifier => 'product_type_package_reln', :description => 'Product Type Package Relationship')
|
6
|
-
ProdTypeRoleType.create(:internal_identifier => 'product_type_package', :description => 'Product Type Package')
|
7
|
-
ProdTypeRoleType.create(:internal_identifier => 'packaged_product_type', :description => 'Packaged Product Type')
|
8
|
-
|
9
|
-
ProdInstanceRelnType.create(:internal_identifier => 'product_instance_package_reln', :description => 'Product Instance Package Relantionship')
|
10
|
-
ProdInstanceRoleType.create(:internal_identifier => 'product_instance_package', :description => 'Product Instance Package')
|
11
|
-
ProdInstanceRoleType.create(:internal_identifier => 'packaged_product_instance', :description => 'Packaged Product Instance')
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
['product_type_package_reln','product_type_package','packaged_product_type'].each do |iid|
|
16
|
-
ProdTypeRelnType.iid(iid).destroy
|
17
|
-
end
|
18
|
-
|
19
|
-
['product_instance_package_reln','product_instance_package','packaged_product_instance'].each do |iid|
|
20
|
-
ProdInstanceRoleType.iid(iid).destroy
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# This migration comes from knitkit (originally 20110509223702)
|
2
|
-
class AddPublisherRole
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
SecurityRole.create(:internal_identifier => 'publisher', :description => 'Publisher')
|
6
|
-
SecurityRole.create(:internal_identifier => 'content_author', :description => 'Content Author')
|
7
|
-
SecurityRole.create(:internal_identifier => 'layout_author', :description => 'Layout Author')
|
8
|
-
SecurityRole.create(:internal_identifier => 'editor', :description => 'Editor')
|
9
|
-
SecurityRole.create(:internal_identifier => 'designer', :description => 'Designer')
|
10
|
-
SecurityRole.create(:internal_identifier => 'website_author', :description => 'Website Author')
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
SecurityRole.iid('publisher').destroy
|
15
|
-
SecurityRole.iid('content_author').destroy
|
16
|
-
SecurityRole.iid('layout_author').destroy
|
17
|
-
SecurityRole.iid('editor').destroy
|
18
|
-
SecurityRole.iid('designer').destroy
|
19
|
-
SecurityRole.iid('website_author').destroy
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# This migration comes from erp_base_erp_svcs (originally 20110525001935)
|
2
|
-
class AddUsdCurrency
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
Currency.create(:name => 'US Dollar', :internal_identifier => 'USD', :major_unit_symbol => "$")
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.down
|
9
|
-
Currency.usd.destroy
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# This migration comes from erp_products (originally 20110527160807)
|
2
|
-
class AddDefaultProdAvailTypes
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
ProdAvailabilityStatusType.create(
|
6
|
-
:description => 'Available',
|
7
|
-
:internal_identifier => 'available'
|
8
|
-
)
|
9
|
-
|
10
|
-
ProdAvailabilityStatusType.create(
|
11
|
-
:description => 'Sold',
|
12
|
-
:internal_identifier => 'sold'
|
13
|
-
)
|
14
|
-
|
15
|
-
ProdAvailabilityStatusType.create(
|
16
|
-
:description => 'Shipped',
|
17
|
-
:internal_identifier => 'shipped'
|
18
|
-
)
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.down
|
22
|
-
%w(available sold shipped).each do |iid|
|
23
|
-
ProdAvailabilityStatusType.find_by_internal_identifier(iid).destroy
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# This migration comes from erp_orders (originally 20110605231556)
|
2
|
-
class CreateOrderPartyRoles
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
order_roles = BizTxnPartyRoleType.create(
|
6
|
-
:description => 'Order Roles',
|
7
|
-
:internal_identifier => 'order_roles'
|
8
|
-
)
|
9
|
-
|
10
|
-
buyor_role = BizTxnPartyRoleType.create(
|
11
|
-
:description => 'Payor',
|
12
|
-
:internal_identifier => 'payor'
|
13
|
-
)
|
14
|
-
|
15
|
-
buyor_role.move_to_child_of(order_roles)
|
16
|
-
buyor_role.save
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.down
|
20
|
-
BizTxnPartyRoleType.find_by_internal_identifier('payor').destroy
|
21
|
-
BizTxnPartyRoleType.find_by_internal_identifier('order_roles').destroy
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# This migration comes from erp_forms (originally 20110608185830)
|
2
|
-
class CreateDefaultDynamicModelsAndForms
|
3
|
-
|
4
|
-
def self.up
|
5
|
-
#insert data here
|
6
|
-
DynamicFormModel.create(:model_name => 'DynamicFormDocument')
|
7
|
-
|
8
|
-
fields = []
|
9
|
-
|
10
|
-
fields << DynamicFormField.textfield({:fieldLabel => 'First Name', :name => 'first_name', :width => 250, :allowBlank => false })
|
11
|
-
fields << DynamicFormField.textfield({:fieldLabel => 'Last Name', :name => 'last_name', :width => 250, :allowBlank => false })
|
12
|
-
fields << DynamicFormField.email({:fieldLabel => 'Email', :name => 'email', :width => 250, :allowBlank => false })
|
13
|
-
fields << DynamicFormField.textarea({:fieldLabel => 'Message', :name => 'message', :width => 400, :height => 200, :allowBlank => false })
|
14
|
-
|
15
|
-
d = DynamicForm.new
|
16
|
-
d.description = 'Contact Form'
|
17
|
-
d.definition = fields.to_json
|
18
|
-
d.model_name = 'WebsiteInquiry'
|
19
|
-
d.internal_identifier = 'contact_us'
|
20
|
-
d.default = true
|
21
|
-
d.dynamic_form_model = DynamicFormModel.create(:model_name => 'WebsiteInquiry')
|
22
|
-
d.comment = "This is the default form used by Knitkit's Contact Us Widget for Website Inquiries. NOTE: The Contact Us Widget uses Knitkit's website configuration options for email behavior & not the Dynamic Forms Widget Action setting."
|
23
|
-
d.msg_target = 'qtip'
|
24
|
-
d.save
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.down
|
28
|
-
#remove data here
|
29
|
-
DynamicFormModel.delete_all
|
30
|
-
DynamicForm.delete_all
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# This migration comes from erp_base_erp_svcs (originally 20110609150135)
|
2
|
-
require 'yaml'
|
3
|
-
|
4
|
-
class AddIsoCodes
|
5
|
-
|
6
|
-
def self.up
|
7
|
-
#find the erp_base_erp_svcs engine
|
8
|
-
engine_path = Rails::Application::Railties.engines.find{|item| item.engine_name == 'erp_base_erp_svcs'}.config.root.to_s
|
9
|
-
|
10
|
-
GeoCountry.load_from_file(File.join(engine_path,'db/data_sets/geo_countries.yml'))
|
11
|
-
GeoZone.load_from_file(File.join(engine_path,'db/data_sets/geo_zones.yml'))
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.down
|
15
|
-
GeoCountry.delete_all
|
16
|
-
GeoZone.delete_all
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|