activerecord_sqlserver_crm 4.2.14 → 4.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a305e8e0f158e0684397490c16894041c4e792bc
4
- data.tar.gz: 509d7453753815d4c69e32234054c6c30f3553e5
3
+ metadata.gz: 6975e80b1bd52beadda3e923575d854291346ec5
4
+ data.tar.gz: 9d5764f836c9d4d573ae54f995f18d895271d815
5
5
  SHA512:
6
- metadata.gz: 5d122989952468c0e3e4dd75e128e2e3e6c25904f3142692638e6449e5ed742b3628838e87c2c814c367afc3bc41d497fcff6845881479c179ae1fd842c7b1ee
7
- data.tar.gz: 4097d93d12a24e0790935e6cf89f17b9d19c829a59c1cab8e9178a69dd6524972d391614ca95dd01d02dfd99f3b5b6941730ada472dccca46371fb1720f0a737
6
+ metadata.gz: 209e4c9d7f9ea364b9fe8c5dd59c4964830edd912d9d4014967200f8f98daadea9ca5c5d9e6096940fbe98f984b7e991917715c8c8ad73192dd5b88a30fad3f4
7
+ data.tar.gz: 094c556f3b8b9a3fbb1234e303241e6806f36d63ee78992af77b0ec7d5edcf0ee5dff1634d7c889417b7ba6911cfc9c6addfb64ed1a78a79408d923ab539b5ad
@@ -5,6 +5,7 @@ module Crm
5
5
 
6
6
  belongs_to :account, foreign_key: 'AccountId', crm_key: 'customerid_account'
7
7
  belongs_to :contact, foreign_key: 'ContactId', crm_key: 'customerid_contact'
8
+ belongs_to :opportunity, foreign_key: 'OpportunityId', crm_key: 'opportunityid'
8
9
  belongs_to :price_list, foreign_key: 'PriceLevelId', crm_key: 'pricelevelid'
9
10
  belongs_to :currency, foreign_key: 'TransactionCurrencyId', crm_key: 'transactioncurrencyid'
10
11
 
@@ -9,6 +9,7 @@ module Crm
9
9
  belongs_to :case, foreign_key: 'ObjectId', crm_key: 'objectid_case'
10
10
  belongs_to :contact, foreign_key: 'ObjectId', crm_key: 'objectid_contact'
11
11
  belongs_to :invoice, foreign_key: 'ObjectId', crm_key: 'objectid_invoice'
12
+ belongs_to :opportunity, foreign_key: 'ObjectId', crm_key: 'objectid_opportunity'
12
13
 
13
14
  validates :Subject, presence: true
14
15
 
@@ -0,0 +1,13 @@
1
+ module Crm
2
+ class Opportunity < ActiveRecord::Base
3
+ self.table_name = "Opportunity"
4
+ self.primary_key = "OpportunityId"
5
+
6
+ belongs_to :campaign, foreign_key: 'CampaignId', crm_key: 'campaignid'
7
+ belongs_to :contact, foreign_key: 'contactid', crm_key: 'parentcontactid'
8
+
9
+ has_many :invoices, foreign_key: 'OpportunityId'
10
+ has_many :notes, foreign_key: 'ObjectId'
11
+
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiverecordSqlserverCrm
2
- VERSION = "4.2.14"
2
+ VERSION = "4.2.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_sqlserver_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.14
4
+ version: 4.2.15
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-11-16 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -144,6 +144,7 @@ files:
144
144
  - app/models/crm/invoice.rb
145
145
  - app/models/crm/invoice_product.rb
146
146
  - app/models/crm/note.rb
147
+ - app/models/crm/opportunity.rb
147
148
  - app/models/crm/price_list.rb
148
149
  - app/models/crm/price_list_item.rb
149
150
  - app/models/crm/product.rb