has_accounts 0.11.0 → 0.12.0
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/booking.rb +10 -0
- data/lib/has_accounts/version.rb +1 -1
- metadata +4 -4
data/app/models/booking.rb
CHANGED
@@ -29,6 +29,16 @@ class Booking < ActiveRecord::Base
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def balance_account
|
33
|
+
return credit_account if credit_account.is_balance_account?
|
34
|
+
return debit_account if debit_account.is_balance_account?
|
35
|
+
end
|
36
|
+
|
37
|
+
def profit_account
|
38
|
+
return credit_account if credit_account.is_profit_account?
|
39
|
+
return debit_account if debit_account.is_profit_account?
|
40
|
+
end
|
41
|
+
|
32
42
|
# Scoping
|
33
43
|
default_scope order('value_date, id')
|
34
44
|
|
data/lib/has_accounts/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 47
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 12
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.12.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-23 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|