Sha256: 6dc50cb4f152cbda8079ce565aed2bbb1b388ce61b345ac5ad67fe760f211247
Contents?: true
Size: 874 Bytes
Versions: 1
Compression:
Stored size: 874 Bytes
Contents
Party.class_eval do has_many :biz_txn_acct_party_roles, dependent: :destroy has_many :biz_txn_acct_roots, :through => :biz_txn_acct_party_roles has_many :biz_txn_party_roles, dependent: :destroy # has_many :entity_content_assignments, :as => :da_assignment # has_many :credit_cards, :class_name => "CreditCard", :foreign_key => "cardholder_id" # Wrapper to get all party accounts def accounts biz_txn_acct_roots end # Adds a business account (BizTxnAcctPartyRole) def add_business_account( acct_root, biz_txn_acct_pty_rtype ) biz_txn_acct_pty_rtype = BizTxnAcctPtyRtype.iid(biz_txn_acct_pty_rtype) if biz_txn_acct_pty_rtype.is_a? String raise "BizTxnAcctPtyRtype does not exist" if biz_txn_acct_pty_rtype.nil? apr = BizTxnAcctPartyRole.new apr.biz_txn_acct_pty_rtype = biz_txn_acct_pty_rtype biz_txn_acct_roots << acct_root end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
erp_txns_and_accts-4.2.0 | app/models/extensions/party.rb |