vesr 0.12.6 → 0.12.7

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.
@@ -1,4 +1,9 @@
1
+ # encoding: utf-8
2
+
1
3
  class EsrFile < ActiveRecord::Base
4
+ # Access restrictions
5
+ attr_accessible :file, :remarks
6
+
2
7
  # Default sorting
3
8
  default_scope order('created_at DESC')
4
9
 
@@ -1,4 +1,9 @@
1
+ # encoding: utf-8
2
+
1
3
  class EsrRecord < ActiveRecord::Base
4
+ # Access restrictions
5
+ attr_accessible :file, :remarks
6
+
2
7
  belongs_to :esr_file
3
8
 
4
9
  belongs_to :booking, :dependent => :destroy, :autosave => true
@@ -204,12 +209,20 @@ class EsrRecord < ActiveRecord::Base
204
209
  end
205
210
 
206
211
  public
212
+ def create_write_off_booking
213
+ invoice.write_off("Korrektur nach VESR Zahlung").save
214
+ end
215
+
207
216
  def create_extra_earning_booking(comments = nil)
208
- Booking.create(:title => "Ausserordentlicher Ertrag",
217
+ if invoice
218
+ invoice.book_extra_earning("Korrektur nach VESR Zahlung").save
219
+ else
220
+ Booking.create(:title => "Ausserordentlicher Ertrag",
209
221
  :comments => comments || "Zahlung kann keiner Rechnung zugewiesen werden",
210
222
  :amount => self.amount,
211
223
  :debit_account => Account.find_by_code(Invoice.settings['invoices.extra_earnings_account_code']),
212
224
  :credit_account => Account.find_by_code(Invoice.settings['invoices.balance_account_code']),
213
225
  :value_date => Date.today)
226
+ end
214
227
  end
215
228
  end
@@ -34,7 +34,7 @@ de:
34
34
  new:
35
35
  title: VESR Datei einlesen
36
36
  index:
37
- index: VESR Liste
37
+ title: VESR Journal
38
38
 
39
39
  # CRUD
40
40
  crud:
data/lib/vesr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vesr
2
- VERSION = "0.12.6"
2
+ VERSION = "0.12.7"
3
3
  end
metadata CHANGED
@@ -1,36 +1,28 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: vesr
3
- version: !ruby/object:Gem::Version
4
- hash: 35
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 12
9
- - 6
10
- version: 0.12.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Roman Simecek
14
- - "Simon H\xC3\xBCrlimann (CyT)"
9
+ - Simon Hürlimann (CyT)
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-07-16 00:00:00 Z
13
+ date: 2012-11-07 00:00:00.000000000 Z
20
14
  dependencies: []
21
-
22
- description: VESR provides support for ESR number calculations and gives ready to use Rails components.
23
- email:
15
+ description: VESR provides support for ESR number calculations and gives ready to
16
+ use Rails components.
17
+ email:
24
18
  - roman.simecek@cyt.ch
25
19
  - simon.huerlimann@cyt.ch
26
20
  executables: []
27
-
28
21
  extensions: []
29
-
30
- extra_rdoc_files:
22
+ extra_rdoc_files:
31
23
  - README.rdoc
32
24
  - LICENSE.txt
33
- files:
25
+ files:
34
26
  - app/assets/images/16x16/book_extra_earning.png
35
27
  - app/assets/images/16x16/reactivate.png
36
28
  - app/assets/images/16x16/resolve.png
@@ -66,38 +58,29 @@ files:
66
58
  - README.rdoc
67
59
  - LICENSE.txt
68
60
  homepage: https://github.com/raskhadafi/vesr
69
- licenses:
61
+ licenses:
70
62
  - MIT
71
63
  post_install_message:
72
64
  rdoc_options: []
73
-
74
- require_paths:
65
+ require_paths:
75
66
  - lib
76
- required_ruby_version: !ruby/object:Gem::Requirement
67
+ required_ruby_version: !ruby/object:Gem::Requirement
77
68
  none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- hash: 3
82
- segments:
83
- - 0
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
74
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
- version: "0"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
94
79
  requirements: []
95
-
96
80
  rubyforge_project:
97
- rubygems_version: 1.8.15
81
+ rubygems_version: 1.8.23
98
82
  signing_key:
99
83
  specification_version: 3
100
84
  summary: VESR invoice support library.
101
85
  test_files: []
102
-
103
86
  has_rdoc: