has_accounts 0.17.5 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/booking.rb +8 -8
- data/lib/has_accounts/version.rb +1 -1
- metadata +5 -5
data/app/models/booking.rb
CHANGED
@@ -111,14 +111,7 @@ class Booking < ActiveRecord::Base
|
|
111
111
|
# Standard methods
|
112
112
|
def to_s(format = :default)
|
113
113
|
case format
|
114
|
-
when :
|
115
|
-
"%s: %s / %s CHF %s" % [
|
116
|
-
value_date ? value_date : '?',
|
117
|
-
credit_account ? credit_account.code : '?',
|
118
|
-
debit_account ? debit_account.code : '?',
|
119
|
-
amount ? "%0.2f" % amount : '?',
|
120
|
-
]
|
121
|
-
else
|
114
|
+
when :long
|
122
115
|
"%s: %s an %s CHF %s, %s (%s)" % [
|
123
116
|
value_date ? value_date : '?',
|
124
117
|
credit_account ? "#{credit_account.title} (#{credit_account.code})" : '?',
|
@@ -127,6 +120,13 @@ class Booking < ActiveRecord::Base
|
|
127
120
|
title.present? ? title : '?',
|
128
121
|
comments.present? ? comments : '?'
|
129
122
|
]
|
123
|
+
else
|
124
|
+
"%s: %s / %s CHF %s" % [
|
125
|
+
value_date ? value_date : '?',
|
126
|
+
credit_account ? credit_account.code : '?',
|
127
|
+
debit_account ? debit_account.code : '?',
|
128
|
+
amount ? "%0.2f" % amount : '?',
|
129
|
+
]
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
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: 87
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 18
|
9
|
+
- 0
|
10
|
+
version: 0.18.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: 2012-02
|
18
|
+
date: 2012-07-02 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|