activerecord_sqlserver_crm 0.0.1 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/crm/case.rb +2 -2
- data/app/models/crm/invoice.rb +3 -2
- data/app/models/crm/invoice_product.rb +4 -1
- data/app/models/crm/note.rb +6 -6
- data/app/models/crm/price_list.rb +2 -1
- data/app/models/crm/price_list_item.rb +2 -1
- data/app/models/crm/product.rb +4 -2
- data/lib/activerecord_sqlserver_crm/version.rb +1 -1
- metadata +22 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f5d55f80f886812ebcd10bee5a4685bcf0ded4
|
4
|
+
data.tar.gz: 2118671c90509972b88871cc3b126e6d9511aa22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94fae9165910482746862c27512a9fe967d86a5386e7e246f9c65d4d1593aef562b59c1f3c84f806661323f3ee6e352fbf3dc6c0e79b8245d85fde41467ff14e
|
7
|
+
data.tar.gz: b35ceec6e79c81afdfc9f5b9816ca26c9dc78b11e4c29be858503268bcd22689dfcbef01c40ff938989cacdf2cb9532af99791e7ebaedb84a5026fb27b096e7a
|
data/app/models/crm/case.rb
CHANGED
@@ -3,8 +3,8 @@ module Crm
|
|
3
3
|
self.table_name = "Incident"
|
4
4
|
self.primary_key = "IncidentId"
|
5
5
|
|
6
|
-
belongs_to :contact, foreign_key: '
|
7
|
-
belongs_to :account, foreign_key: '
|
6
|
+
belongs_to :contact, foreign_key: 'ContactId', crm_key: 'customerid_contact'
|
7
|
+
belongs_to :account, foreign_key: 'AccountId', crm_key: 'customerid_account'
|
8
8
|
|
9
9
|
has_many :notes, foreign_key: 'ObjectId'
|
10
10
|
|
data/app/models/crm/invoice.rb
CHANGED
@@ -3,8 +3,9 @@ module Crm
|
|
3
3
|
self.table_name = "Invoice"
|
4
4
|
self.primary_key = "InvoiceId"
|
5
5
|
|
6
|
-
belongs_to :
|
7
|
-
belongs_to :
|
6
|
+
belongs_to :account, foreign_key: 'AccountId', crm_key: 'customerid_account'
|
7
|
+
belongs_to :contact, foreign_key: 'ContactId', crm_key: 'customerid_contact'
|
8
|
+
belongs_to :price_list, foreign_key: 'PriceLevelId', crm_key: 'pricelevelid'
|
8
9
|
|
9
10
|
has_many :invoice_products, foreign_key: 'InvoiceId'
|
10
11
|
has_many :notes, foreign_key: 'ObjectId'
|
@@ -3,7 +3,10 @@ module Crm
|
|
3
3
|
self.table_name = "InvoiceDetail"
|
4
4
|
self.primary_key = "InvoiceDetailId"
|
5
5
|
|
6
|
-
belongs_to :invoice, foreign_key: '
|
6
|
+
belongs_to :invoice, foreign_key: 'InvoiceId', crm_key: 'invoiceid'
|
7
|
+
belongs_to :product, foreign_key: 'ProductId', crm_key: 'productid'
|
8
|
+
belongs_to :currency, foreign_key: 'TransactionCurrencyId', crm_key: 'transactioncurrencyid'
|
9
|
+
belongs_to :original_currency, foreign_key: 'new_OriginalCurrency', crm_key: 'new_originalcurrency', class_name: 'Crm::Currency'
|
7
10
|
|
8
11
|
end
|
9
12
|
end
|
data/app/models/crm/note.rb
CHANGED
@@ -3,12 +3,12 @@ module Crm
|
|
3
3
|
self.table_name = "Annotation"
|
4
4
|
self.primary_key = "AnnotationId"
|
5
5
|
|
6
|
-
belongs_to :account, foreign_key: '
|
7
|
-
belongs_to :campaign, foreign_key: '
|
8
|
-
belongs_to :campaign_response, foreign_key: '
|
9
|
-
belongs_to :case, foreign_key: '
|
10
|
-
belongs_to :contact, foreign_key: '
|
11
|
-
belongs_to :invoice, foreign_key: '
|
6
|
+
belongs_to :account, foreign_key: 'OwnerId', crm_key: 'Account_Annotation'
|
7
|
+
belongs_to :campaign, foreign_key: 'OwnerId', crm_key: 'Campaign_Annotation'
|
8
|
+
belongs_to :campaign_response, foreign_key: 'OwnerId', crm_key: 'CampaignResponse_Annotation'
|
9
|
+
belongs_to :case, foreign_key: 'OwnerId', crm_key: 'Case_Annotation'
|
10
|
+
belongs_to :contact, foreign_key: 'OwnerId', crm_key: 'Contact_Annotation'
|
11
|
+
belongs_to :invoice, foreign_key: 'OwnerId', crm_key: 'Invoice_Annotation'
|
12
12
|
|
13
13
|
end
|
14
14
|
end
|
@@ -3,9 +3,10 @@ module Crm
|
|
3
3
|
self.table_name = "PriceLevel"
|
4
4
|
self.primary_key = "PriceLevelId"
|
5
5
|
|
6
|
+
belongs_to :currency, foreign_key: 'TransactionCurrencyId', crm_key: 'transactioncurrencyid'
|
7
|
+
|
6
8
|
has_many :invoices, foreign_key: 'PriceLevelId'
|
7
9
|
has_many :price_list_items, foreign_key: 'PriceLevelId'
|
8
|
-
has_many :products, foreign_key: 'PriceLevelId'
|
9
10
|
|
10
11
|
end
|
11
12
|
end
|
@@ -3,7 +3,8 @@ module Crm
|
|
3
3
|
self.table_name = "ProductPriceLevel"
|
4
4
|
self.primary_key = "ProductPriceLevelId"
|
5
5
|
|
6
|
-
belongs_to :price_list, foreign_key: '
|
6
|
+
belongs_to :price_list, foreign_key: 'PriceLevelId', crm_key: 'pricelevelid'
|
7
|
+
belongs_to :product, foreign_key: 'ProductId', crm_key: 'productid'
|
7
8
|
|
8
9
|
end
|
9
10
|
end
|
data/app/models/crm/product.rb
CHANGED
@@ -3,10 +3,12 @@ module Crm
|
|
3
3
|
self.table_name = "Product"
|
4
4
|
self.primary_key = "ProductId"
|
5
5
|
|
6
|
-
belongs_to :price_list, foreign_key: '
|
6
|
+
belongs_to :price_list, foreign_key: 'PriceLevelId', crm_key: 'pricelevelid'
|
7
|
+
belongs_to :currency, foreign_key: 'TransactionCurrencyId', crm_key: 'transactioncurrencyid'
|
7
8
|
|
8
9
|
has_many :notes, foreign_key: 'ObjectId'
|
9
|
-
has_many :
|
10
|
+
has_many :invoice_products, foreign_key: 'ProductId'
|
11
|
+
has_many :price_list_items, foreign_key: 'ProductId'
|
10
12
|
|
11
13
|
end
|
12
14
|
end
|
metadata
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_sqlserver_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rolf Lawrenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 4.2.6
|
20
23
|
type: :runtime
|
@@ -22,12 +25,18 @@ dependencies:
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.2'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 4.2.6
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activerecord-sqlserver-adapter
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '4.2'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
42
|
version: 4.2.13
|
@@ -35,6 +44,9 @@ dependencies:
|
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4.2'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
52
|
version: 4.2.13
|
@@ -84,16 +96,22 @@ dependencies:
|
|
84
96
|
name: byebug
|
85
97
|
requirement: !ruby/object:Gem::Requirement
|
86
98
|
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '9.0'
|
87
102
|
- - ">="
|
88
103
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
104
|
+
version: 9.0.5
|
90
105
|
type: :development
|
91
106
|
prerelease: false
|
92
107
|
version_requirements: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '9.0'
|
94
112
|
- - ">="
|
95
113
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
114
|
+
version: 9.0.5
|
97
115
|
description: A rails engine that uses ActiveRecord SQL Server to read from CRM SQL
|
98
116
|
Server, and OData to write to CRM.
|
99
117
|
email:
|