erp_txns_and_accts 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +1,21 @@
1
1
  class BizTxnAcctRoot < ActiveRecord::Base
2
2
 
3
- belongs_to :biz_txn_acct, :polymorphic => true
4
- has_many :biz_txn_events, :dependent => :destroy
5
- has_many :biz_txn_acct_party_roles, :dependent => :destroy
6
-
7
- alias :account :biz_txn_acct
8
- alias :txn_events :biz_txn_events
9
- alias :txns :biz_txn_events
10
-
11
- def to_label
3
+ belongs_to :biz_txn_acct, :polymorphic => true
4
+ belongs_to :txn_account_type, :class_name => 'BizTxnAcctType', :foreign_key => 'biz_txn_acct_type_id'
5
+ has_many :biz_txn_events, :dependent => :destroy
6
+ has_many :biz_txn_acct_party_roles, :dependent => :destroy
7
+
8
+ alias :account :biz_txn_acct
9
+ alias :txn_events :biz_txn_events
10
+ alias :txns :biz_txn_events
11
+
12
+ def to_label
12
13
  "#{description}"
13
- end
14
-
15
- def to_s
14
+ end
15
+
16
+ def to_s
16
17
  "#{description}"
17
- end
18
+ end
18
19
 
19
20
  def add_party_with_role(party, biz_txn_acct_pty_rtype, description=nil)
20
21
  biz_txn_acct_pty_rtype = BizTxnAcctPtyRtype.iid(biz_txn_acct_pty_rtype) if biz_txn_acct_pty_rtype.is_a? String
@@ -29,5 +30,5 @@ class BizTxnAcctRoot < ActiveRecord::Base
29
30
  raise "BizTxnAcctPtyRtype #{biz_txn_acct_pty_rtype.to_s} does not exist" if biz_txn_acct_pty_rtype.nil?
30
31
  self.biz_txn_acct_party_roles.where('biz_txn_acct_pty_rtype_id = ?', biz_txn_acct_pty_rtype.id).collect(&:party)
31
32
  end
32
-
33
+
33
34
  end
@@ -0,0 +1,5 @@
1
+ class AddBizTxnAcctTypeIdToBizTxnAcctRoot < ActiveRecord::Migration
2
+ def change
3
+ add_column :biz_txn_acct_roots, :biz_txn_acct_type_id, :integer
4
+ end
5
+ end
@@ -1,8 +1,8 @@
1
1
  module ErpTxnsAndAccts
2
- module Extensions
3
- module ActiveRecord
4
- module ActsAsBizTxnAccount
5
-
2
+ module Extensions
3
+ module ActiveRecord
4
+ module ActsAsBizTxnAccount
5
+
6
6
  def self.included(base)
7
7
  base.extend(ClassMethods)
8
8
  end
@@ -21,6 +21,7 @@ module ErpTxnsAndAccts
21
21
 
22
22
  [
23
23
  :biz_txn_acct_type,
24
+ :txn_account_type,:txn_account_type=,
24
25
  :biz_txn_events,
25
26
  :biz_txn_acct_party_roles,
26
27
  :txn_events,:add_party_with_role,
@@ -52,13 +53,13 @@ module ErpTxnsAndAccts
52
53
  end
53
54
 
54
55
  def destroy_biz_txn_account
55
- self.biz_txn_acct_root.destroy if (self.biz_txn_acct_root && !self.biz_txn_acct_root.frozen?)
56
- end
56
+ self.biz_txn_acct_root.destroy if (self.biz_txn_acct_root && !self.biz_txn_acct_root.frozen?)
57
+ end
57
58
  end
58
-
59
+
59
60
  module SingletonMethods
60
61
  end
61
-
62
+
62
63
  end#ActsAsBizTxnAccount
63
64
  end#ActiveRecord
64
65
  end#Extensions
@@ -2,7 +2,7 @@ module ErpTxnsAndAccts
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_txns_and_accts
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
12
+ date: 2013-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_agreements
16
- requirement: &70225220092880 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70225220092880
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: erp_dev_svcs
27
- requirement: &70225220092380 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '3.0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70225220092380
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.0'
36
46
  description: ! 'The Transactions and Accounts Engine implements the root classes for
37
47
  adding business transactions and accounts to parties. The key marker interface classes
38
48
  here are BizTxnEvent, which represents a common interface for all manner of management
@@ -80,6 +90,7 @@ files:
80
90
  - db/data_migrations/20101014142230_financial_txn_types.rb
81
91
  - db/migrate/20080805000030_base_txns_and_accts.rb
82
92
  - db/migrate/20110609230152_update_financial_txns.rb
93
+ - db/migrate/20130408195119_add_biz_txn_acct_type_id_to_biz_txn_acct_root.rb
83
94
  - db/migrate/upgrade/20120118135738_add_type_column_to_biz_txn_acct_root.rb
84
95
  - db/migrate/upgrade/20120118143602_add_apply_date_to_financial_txn.rb
85
96
  - db/migrate/upgrade/20120515155000_update_financial_txn_acct_due_date.rb
@@ -166,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
177
  version: '0'
167
178
  requirements: []
168
179
  rubyforge_project:
169
- rubygems_version: 1.8.11
180
+ rubygems_version: 1.8.24
170
181
  signing_key:
171
182
  specification_version: 3
172
183
  summary: The Transactions and Accounts Engine implements the root classes for adding