plutus 0.10.0 → 0.10.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5850f1e4f86a57e483ca5a836902f7bf9878834c
4
- data.tar.gz: 79269ad5a37bedbd9b9d0f6a357c048b842016aa
3
+ metadata.gz: 9fcc5366c07c941520dd02ae4766c2f3a66bc86b
4
+ data.tar.gz: e65271810a8320451378f8ab75d4ac03ed14d4ba
5
5
  SHA512:
6
- metadata.gz: d1d1fdde28fb5f79f02420ab3def009c21fe665e9d428305b1c5427c37c797218ec89d81e3827894860d4d4f6e14f0f654d6a6cee169798613ddecb6179bf712
7
- data.tar.gz: 2626117c0674a588f6f4213e548d47dbaf6865fcff4e49485fcad1490b1d25f9b411738a34e1b7a6ecf9a0ece691bbf39c8806fa673536bca041e75108d89ce3
6
+ metadata.gz: bd9b9c732a986b477cd82777bfbf571303b41274f1a49f35fd9f0205c942ed037d330ebdab6cd764e1c2f32848cbd511e3322db99432bb2641edc41a16fec7ac
7
+ data.tar.gz: 6913884a7ca65b31f98abe1c978a585f3e8c212d0074a2dce4e7755b09163560e93c296b457659c3ca4c422832f845a148efd8ac78a03c7e625540bc211107e2
@@ -38,9 +38,9 @@ module Plutus
38
38
  validates_presence_of :type
39
39
 
40
40
  if Plutus.enable_tenancy
41
- include Tenancy
41
+ include Plutus::Tenancy
42
42
  else
43
- include NoTenancy
43
+ include Plutus::NoTenancy
44
44
  end
45
45
 
46
46
  # The credit balance for the account.
@@ -74,10 +74,10 @@ module Plutus
74
74
  #
75
75
  # @return [BigDecimal] The decimal value balance of all accounts
76
76
  def self.trial_balance
77
- unless self.new.class == Account
77
+ unless self.new.class == Plutus::Account
78
78
  raise(NoMethodError, "undefined method 'trial_balance'")
79
79
  else
80
- Asset.balance - (Liability.balance + Equity.balance + Revenue.balance - Expense.balance)
80
+ Plutus::Asset.balance - (Plutus::Liability.balance + Plutus::Equity.balance + Plutus::Revenue.balance - Plutus::Expense.balance)
81
81
  end
82
82
  end
83
83
 
@@ -40,21 +40,21 @@ module Plutus
40
40
  # entry = Plutus::Entry.build(
41
41
  # description: "Sold some widgets",
42
42
  # debits: [
43
- # {account: "Accounts Receivable", amount: 50}],
43
+ # {account: "Accounts Receivable", amount: 50}],
44
44
  # credits: [
45
45
  # {account: "Sales Revenue", amount: 45},
46
46
  # {account: "Sales Tax Payable", amount: 5}])
47
47
  #
48
48
  # @return [Plutus::Entry] A Entry with built credit and debit objects ready for saving
49
49
  def self.build(hash)
50
- entry = Entry.new(:description => hash[:description], :commercial_document => hash[:commercial_document])
50
+ entry = Plutus::Entry.new(:description => hash[:description], :commercial_document => hash[:commercial_document])
51
51
  hash[:debits].each do |debit|
52
- a = Account.find_by_name(debit[:account])
53
- entry.debit_amounts << DebitAmount.new(:account => a, :amount => debit[:amount], :entry => entry)
52
+ a = Plutus::Account.find_by_name(debit[:account])
53
+ entry.debit_amounts << Plutus::DebitAmount.new(:account => a, :amount => debit[:amount], :entry => entry)
54
54
  end
55
55
  hash[:credits].each do |credit|
56
- a = Account.find_by_name(credit[:account])
57
- entry.credit_amounts << CreditAmount.new(:account => a, :amount => credit[:amount], :entry => entry)
56
+ a = Plutus::Account.find_by_name(credit[:account])
57
+ entry.credit_amounts << Plutus::CreditAmount.new(:account => a, :amount => credit[:amount], :entry => entry)
58
58
  end
59
59
  entry
60
60
  end
@@ -1,3 +1,3 @@
1
1
  module Plutus
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bulat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-01 00:00:00.000000000 Z
11
+ date: 2015-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails