erp_orders 3.1.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/app/models/order_line_item.rb +6 -0
  3. data/app/models/order_line_item_pty_role.rb +1 -1
  4. data/app/models/order_txn.rb +6 -3
  5. data/config/routes.rb +0 -10
  6. data/db/migrate/20131005232344_update_order_line_pty_role_indexes.erp_orders.rb +19 -0
  7. data/db/migrate/20131005232611_remove_order_line_specific_rtype.rb +32 -0
  8. data/db/migrate/20140129200040_add_uom_to_order_line_item.rb +13 -0
  9. data/db/migrate/20140930152140_add_custom_fields_to_order_txn.rb +12 -0
  10. data/lib/erp_orders/engine.rb +2 -1
  11. data/lib/erp_orders/extensions/active_record/acts_as_order_line_item.rb +71 -0
  12. data/lib/erp_orders/extensions/active_record/acts_as_order_txn.rb +62 -61
  13. data/lib/erp_orders/extensions.rb +2 -1
  14. data/lib/erp_orders/version.rb +7 -3
  15. metadata +33 -144
  16. data/app/assets/javascripts/erp_orders/application.js +0 -9
  17. data/app/assets/stylesheets/erp_orders/application.css +0 -7
  18. data/app/controllers/erp_orders/erp_app/desktop/order_manager/base_controller.rb +0 -147
  19. data/app/controllers/erp_orders/erp_app/organizer/order_management/base_controller.rb +0 -19
  20. data/app/helpers/erp_orders/application_helper.rb +0 -4
  21. data/app/models/line_item_role_type.rb +0 -6
  22. data/app/views/layouts/erp_orders/application.html.erb +0 -14
  23. data/db/data_migrations/20110728201731_create_desktop_app_order_manager.rb +0 -25
  24. data/db/data_migrations/20110728201732_create_organizer_app_order_management.rb +0 -14
  25. data/db/data_migrations/20120229174343_add_orders_widget.rb +0 -28
  26. data/public/javascripts/erp_app/desktop/applications/order_manager/line_items_grid_panel.js +0 -100
  27. data/public/javascripts/erp_app/desktop/applications/order_manager/module.js +0 -85
  28. data/public/javascripts/erp_app/desktop/applications/order_manager/orders_grid_panel.js +0 -162
  29. data/public/javascripts/erp_app/desktop/applications/order_manager/payments_grid_panel.js +0 -109
  30. data/public/javascripts/erp_app/organizer/applications/order_management/base.js +0 -124
  31. data/public/javascripts/erp_app/organizer/applications/order_management/extensions.js +0 -113
  32. data/public/javascripts/erp_app/organizer/applications/order_management/line_items_grid_panel.js +0 -99
  33. data/public/javascripts/erp_app/organizer/applications/order_management/orders_grid_panel.1.js +0 -209
  34. data/public/javascripts/erp_app/organizer/applications/order_management/payments_grid_panel.js +0 -93
  35. data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +0 -28
  36. data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +0 -16
  37. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
  38. data/spec/dummy/db/data_migrations/20110324010232_product_role_types.erp_products.rb +0 -24
  39. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
  40. data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +0 -27
  41. data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +0 -24
  42. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
  43. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +0 -252
  44. data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +0 -26
  45. data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +0 -26
  46. data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +0 -15
  47. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +0 -53
  48. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
  49. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +0 -21
  50. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +0 -32
  51. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
  52. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +0 -23
  53. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +0 -42
  54. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
  55. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +0 -29
  56. data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +0 -29
  57. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +0 -11
  58. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +0 -19
  59. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +0 -23
  60. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
  61. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +0 -16
  62. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
  63. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +0 -23
  64. data/spec/dummy/db/migrate/20130107205931_base_erp_services.erp_base_erp_svcs.rb +0 -461
  65. data/spec/dummy/db/migrate/20130107205932_base_orders.erp_orders.rb +0 -178
  66. data/spec/dummy/db/migrate/20130107205933_base_tech_services.erp_tech_svcs.rb +0 -271
  67. data/spec/dummy/db/migrate/20130107205934_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
  68. data/spec/dummy/db/migrate/20130107205935_create_groups.erp_tech_svcs.rb +0 -19
  69. data/spec/dummy/db/migrate/20130107205936_upgrade_security.erp_tech_svcs.rb +0 -54
  70. data/spec/dummy/db/migrate/20130107205937_upgrade_security2.erp_tech_svcs.rb +0 -270
  71. data/spec/dummy/db/migrate/20130107205938_base_products.erp_products.rb +0 -234
  72. data/spec/dummy/db/migrate/20130107205939_base_products_indexes.erp_products.rb +0 -59
  73. data/spec/dummy/db/migrate/20130107205940_base_txns_and_accts.erp_txns_and_accts.rb +0 -364
  74. data/spec/dummy/db/migrate/20130107205941_agreements_services.erp_agreements.rb +0 -160
  75. data/spec/dummy/db/migrate/20130107205942_agreements_services_indexes.erp_agreements.rb +0 -52
  76. data/spec/dummy/db/migrate/20130107205943_base_app_framework.erp_app.rb +0 -276
  77. data/spec/dummy/db/migrate/20130107205944_erp_commerce_base.erp_commerce.rb +0 -442
  78. data/spec/dummy/db/schema.rb +0 -1821
  79. data/spec/dummy/db/spec.sqlite3 +0 -0
@@ -1,99 +0,0 @@
1
- Ext.define("Compass.ErpApp.Organizer.Applications.OrderManagement.OrderLineItemsGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.organizerordermanagement_orderlineitemsgridpanel',
4
- initComponent : function(){
5
- this.bbar = Ext.create("Ext.PagingToolbar",{
6
- pageSize: 10,
7
- store:this.store,
8
- displayInfo: true,
9
- displayMsg: '{0} - {1} of {2}',
10
- emptyMsg: "Empty"
11
- });
12
-
13
- Compass.ErpApp.Organizer.Applications.OrderManagement.OrderLineItemsGridPanel.superclass.initComponent.call(this, arguments);
14
- },
15
-
16
- constructor : function(config) {
17
- var store = Ext.create("Ext.data.Store",{
18
- proxy:{
19
- type:'ajax',
20
- url: '/erp_orders/erp_app/desktop/order_manager/line_items',
21
- reader:{
22
- type:'json',
23
- root: 'lineItems'
24
- }
25
- },
26
- totalProperty: 'totalCount',
27
- extraParams:{
28
- order_id:null
29
- },
30
- fields:[
31
- 'product',
32
- 'quantity',
33
- 'sku',
34
- {
35
- name:'price',
36
- type:'float'
37
- },
38
- 'currency_display',
39
- 'id'
40
- ]
41
- });
42
-
43
- config = Ext.apply({
44
- layout:'fit',
45
- columns: [
46
- {
47
- header:'Product',
48
- sortable: true,
49
- dataIndex: 'product'
50
- },
51
- {
52
- header:'SKU',
53
- sortable: true,
54
- dataIndex: 'sku'
55
- },
56
- {
57
- header:'Quantity',
58
- sortable: true,
59
- dataIndex: 'quantity'
60
- },
61
- {
62
- header:'Price',
63
- sortable: true,
64
- dataIndex: 'price',
65
- renderer:function(v){
66
- return v.toFixed(2);
67
- }
68
-
69
- },
70
- {
71
- header: 'Currency',
72
- width: 75,
73
- sortable: true,
74
- dataIndex: 'currency_display'
75
-
76
- }
77
- ],
78
- loadMask: true,
79
- autoScroll:true,
80
- stripeRows: true,
81
- store:store,
82
- viewConfig:{
83
- forceFit:true
84
- },
85
- listeners:{
86
- activate:function(grid){
87
- var layout = grid.findParentByType('organizer_orderslayout');
88
- if(!Compass.ErpApp.Utility.isBlank(layout.orderId)){
89
- var store = grid.getStore();
90
- store.proxy.extraParams.order_id = layout.orderId;
91
- store.load();
92
- }
93
- }
94
- }
95
- }, config);
96
-
97
- Compass.ErpApp.Organizer.Applications.OrderManagement.OrderLineItemsGridPanel.superclass.constructor.call(this, config);
98
- }
99
- });
@@ -1,209 +0,0 @@
1
- Ext.define("Compass.ErpApp.Organizer.Applications.OrderManagement.OrdersGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.ordermanager_ordersgridpanel',
4
- deleteOrder : function(rec){
5
- var self = this;
6
- Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this order?', function(btn){
7
- if(btn == 'no'){
8
- return false;
9
- }
10
- else
11
- {
12
- Ext.Ajax.request({
13
- url: '/erp_orders/erp_app/desktop/order_manager/delete/'+rec.get('id'),
14
- success: function(response) {
15
- var obj = Ext.util.JSON.decode(response.responseText);
16
- if(obj.success){
17
- self.getStore().load();
18
- }
19
- else{
20
- Ext.Msg.alert('Error', 'Error deleting order.');
21
- }
22
- },
23
- failure: function(response) {
24
- Ext.Msg.alert('Error', 'Error deleting order.');
25
- }
26
- });
27
- }
28
- });
29
- },
30
-
31
- initComponent : function(){
32
- this.setParams = function(params) {
33
- this.partyId = params.partyId;
34
- this.store.proxy.extraParams.party_id = params.partyId;
35
- };
36
-
37
- this.bbar = Ext.create("Ext.PagingToolbar",{
38
- pageSize: this.initialConfig['pageSize'] || 50,
39
- store:this.store,
40
- displayInfo: true,
41
- displayMsg: '{0} - {1} of {2}',
42
- emptyMsg: "Empty"
43
- });
44
-
45
- Compass.ErpApp.Organizer.Applications.OrderManagement.OrdersGridPanel.superclass.initComponent.call(this, arguments);
46
- },
47
-
48
- constructor : function(config) {
49
- var store = Ext.create("Ext.data.Store",{
50
- proxy:{
51
- type:'ajax',
52
- url: '/erp_orders/erp_app/desktop/order_manager',
53
- reader:{
54
- type:'json',
55
- root: 'orders'
56
- }
57
- },
58
- totalProperty: 'totalCount',
59
- idProperty: 'id',
60
- fields:[
61
- 'total_price',
62
- 'order_number',
63
- 'status',
64
- 'first_name',
65
- 'last_name',
66
- 'email',
67
- 'phone',
68
- 'id',
69
- 'created_at',
70
- 'payor_party_id'
71
- ]
72
- });
73
-
74
- config = Ext.apply({
75
- columns: [
76
- {
77
- header:'Order Number',
78
- sortable: true,
79
- dataIndex: 'order_number'
80
- },
81
- {
82
- header:'Status',
83
- sortable: true,
84
- width:150,
85
- dataIndex: 'status'
86
- },
87
- {
88
- header:'Total Price',
89
- sortable: true,
90
- dataIndex: 'total_price'
91
- },
92
- {
93
- header:'First Name',
94
- sortable: true,
95
- width:150,
96
- dataIndex: 'first_name'
97
- },
98
- {
99
- header:'Last Name',
100
- sortable: true,
101
- width:150,
102
- dataIndex: 'last_name'
103
- },
104
- {
105
- header:'Email',
106
- sortable: true,
107
- dataIndex: 'email'
108
- },
109
- {
110
- header:'Phone',
111
- sortable: true,
112
- dataIndex: 'phone'
113
- },
114
- {
115
- header:'Created At',
116
- sortable: true,
117
- dataIndex: 'created_at',
118
- width:150,
119
- renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
120
- },
121
- {
122
- menuDisabled:true,
123
- resizable:false,
124
- xtype:'actioncolumn',
125
- header:'Payor Info',
126
- align:'center',
127
- width:100,
128
- items:[{
129
- icon:'/images/icons/about/about_16x16.png',
130
- tooltip:'View Payor Info',
131
- handler :function(grid, rowIndex, colIndex){
132
- var rec = grid.getStore().getAt(rowIndex);
133
- var payorPartyId = rec.get('payor_party_id');
134
-
135
- if(Compass.ErpApp.Utility.isBlank(payorPartyId)){
136
- Ext.Msg.alert('Status', 'No Buyer data has been collected yet.')
137
- return false;
138
- }
139
-
140
- var individualsGrid = Ext.getCmp('individualSearchGrid');
141
-
142
- var index = individualsGrid.getStore().find("id", payorPartyId);
143
- var record = individualsGrid.getStore().getAt(index);
144
- individualsGrid.getSelectionModel().select([record], false);
145
- Compass.ErpApp.Organizer.Layout.setActiveCenterItem('individuals_search_grid');
146
- var individualsTabPanel = Ext.getCmp('individualsTabPanel');
147
- var ordersGridPanel = individualsTabPanel.query('ordermanager_ordersgridpanel')[0];
148
- individualsTabPanel.setActiveTab(ordersGridPanel.id);
149
- }
150
- }]
151
- },
152
- {
153
- menuDisabled:true,
154
- resizable:false,
155
- xtype:'actioncolumn',
156
- header:'Delete',
157
- align:'center',
158
- width:60,
159
- items:[{
160
- icon:'/images/icons/delete/delete_16x16.png',
161
- tooltip:'Delete',
162
- handler :function(grid, rowIndex, colIndex){
163
- var rec = grid.getStore().getAt(rowIndex);
164
- grid.deleteOrder(rec);
165
- }
166
- }]
167
- }
168
- ],
169
- loadMask: true,
170
- autoScroll:true,
171
- stripeRows: true,
172
- store:store,
173
- tbar:{
174
- items:[
175
- {
176
- xtype:'numberfield',
177
- hideLabel:true,
178
- emptyText:'Order Number'
179
- },
180
- {
181
- text:'Search',
182
- iconCls:'icon-search',
183
- handler:function(btn){
184
- var orderNumber = btn.findParentByType('toolbar').query('numberfield')[0].getValue();
185
- var store = btn.findParentByType('ordermanager_ordersgridpanel').getStore();
186
- store.load({
187
- params:{
188
- order_number:orderNumber
189
- }
190
- });
191
- }
192
- },
193
- '|',
194
- {
195
- text: 'All',
196
- xtype:'button',
197
- iconCls: 'icon-eye',
198
- handler: function(btn) {
199
- btn.findParentByType('ordermanager_ordersgridpanel').store.proxy.extraParams.order_number = null;
200
- btn.findParentByType('ordermanager_ordersgridpanel').store.load();
201
- }
202
- },
203
- ]
204
- }
205
- }, config);
206
-
207
- Compass.ErpApp.Organizer.Applications.OrderManagement.OrdersGridPanel.superclass.constructor.call(this, config);
208
- }
209
- });
@@ -1,93 +0,0 @@
1
- Ext.define("Compass.ErpApp.Organizer.Applications.OrderManagement.PaymentsGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.organizerordermanagement_paymentsgridpanel',
4
- constructor : function(config) {
5
- var store = Ext.create("Ext.data.Store",{
6
- proxy:{
7
- type:'ajax',
8
- url: '/erp_orders/erp_app/desktop/order_manager/payments',
9
- reader:{
10
- type:'json',
11
- root: 'payments'
12
- }
13
- },
14
- extraParam:{
15
- order_id:null
16
- },
17
- fields:[
18
- 'authorization',
19
- 'status',
20
- 'created_at',
21
- {
22
- name:'amount',
23
- type:'float'
24
- },
25
- 'currency_display',
26
- 'id',
27
- 'success'
28
- ]
29
- });
30
-
31
- config = Ext.apply({
32
- layout:'fit',
33
- columns: [
34
- {
35
- header:'Authorization Number',
36
- sortable: true,
37
- dataIndex: 'authorization'
38
- },
39
- {
40
- header:'Status',
41
- sortable: true,
42
- dataIndex: 'status'
43
- },
44
- {
45
- header:'Successful',
46
- sortable: true,
47
- dataIndex: 'success'
48
- },
49
- {
50
- header:'Amount',
51
- sortable: true,
52
- dataIndex: 'amount',
53
- renderer:function(v){
54
- return v.toFixed(2);
55
- }
56
-
57
- },
58
- {
59
- header: 'Currency',
60
- width: 75,
61
- sortable: true,
62
- dataIndex: 'currency_display'
63
-
64
- },
65
- {
66
- header: 'Created At',
67
- sortable: true,
68
- dataIndex: 'created_at',
69
- renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
70
- }
71
- ],
72
- loadMask: true,
73
- autoScroll:true,
74
- stripeRows: true,
75
- store:store,
76
- viewConfig:{
77
- forceFit:true
78
- },
79
- listeners:{
80
- activate:function(grid){
81
- var layout = grid.findParentByType('organizer_orderslayout');
82
- if(!Compass.ErpApp.Utility.isBlank(layout.orderId)){
83
- var store = grid.getStore();
84
- store.proxy.extraParams.order_id = layout.orderId;
85
- store.load();
86
- }
87
- }
88
- }
89
- }, config);
90
-
91
- Compass.ErpApp.Organizer.Applications.OrderManagement.PaymentsGridPanel.superclass.constructor.call(this, config);
92
- }
93
- });
@@ -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
@@ -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,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
@@ -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,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