plutus 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/plutus/account.rb +4 -4
- data/app/models/plutus/entry.rb +6 -6
- data/lib/plutus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fcc5366c07c941520dd02ae4766c2f3a66bc86b
|
4
|
+
data.tar.gz: e65271810a8320451378f8ab75d4ac03ed14d4ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/app/models/plutus/entry.rb
CHANGED
@@ -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
|
data/lib/plutus/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|