erp_base_erp_svcs 3.1.3 → 3.1.4
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.
- data/app/models/compass_ae_instance.rb +3 -14
- data/app/models/party.rb +14 -0
- data/lib/erp_base_erp_svcs/version.rb +1 -1
- metadata +2 -2
@@ -29,19 +29,8 @@ class CompassAeInstance < ActiveRecord::Base
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def setup_guid
|
32
|
-
|
32
|
+
guid = Digest::SHA1.hexdigest(Time.now.to_s + rand(10000).to_s)
|
33
|
+
set_guid(guid)
|
34
|
+
guid
|
33
35
|
end
|
34
|
-
|
35
|
-
def is_active?
|
36
|
-
self.type.nil? || self.current_status == 'deployed'
|
37
|
-
end
|
38
|
-
|
39
|
-
def activate
|
40
|
-
self.current_status = 'deployed'
|
41
|
-
end
|
42
|
-
|
43
|
-
def deactivate
|
44
|
-
self.current_status = 'undeployed'
|
45
|
-
end
|
46
|
-
|
47
36
|
end
|
data/app/models/party.rb
CHANGED
@@ -40,6 +40,20 @@ class Party < ActiveRecord::Base
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
def has_role_type?(*passed_roles)
|
44
|
+
result = false
|
45
|
+
passed_roles.flatten!
|
46
|
+
passed_roles.each do |role|
|
47
|
+
role_iid = role.is_a?(RoleType) ? role.internal_identifier : role.to_s
|
48
|
+
self.role_types.each do |this_role|
|
49
|
+
result = true if (this_role.internal_identifier == role_iid)
|
50
|
+
break if result
|
51
|
+
end
|
52
|
+
break if result
|
53
|
+
end
|
54
|
+
result
|
55
|
+
end
|
56
|
+
|
43
57
|
def has_phone_number?(phone_number)
|
44
58
|
result = nil
|
45
59
|
self.contacts.each do |c|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erp_base_erp_svcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: attr_encrypted
|