king_dtaus 2.0.0 → 2.0.1.pre
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/.rvmrc +1 -0
- data/Gemfile +1 -5
- data/Gemfile.lock +38 -0
- data/README.rdoc +120 -0
- data/Rakefile +1 -7
- data/VERSION +1 -1
- data/king_dtaus.gemspec +11 -12
- data/lib/king_dta/account.rb +29 -30
- data/lib/king_dta/dta.rb +0 -10
- data/lib/king_dta/dtaus.rb +134 -125
- data/lib/king_dta/dtazv.rb +221 -183
- data/lib/king_dta/helper.rb +1 -3
- data/lib/king_dtaus.rb +0 -1
- data/spec/account_spec.rb +150 -64
- data/spec/booking_spec.rb +3 -1
- data/spec/dtaus_spec.rb +12 -35
- data/spec/dtazv_spec.rb +155 -54
- data/spec/dtazv_test.rb +105 -0
- data/spec/spec_helper.rb +65 -43
- metadata +38 -48
- data/.travis.yml +0 -3
- data/README.markdown +0 -128
- /data/{docs/example.output → example.output} +0 -0
data/spec/dtazv_spec.rb
CHANGED
@@ -6,9 +6,42 @@ require 'spec_helper'
|
|
6
6
|
describe KingDta::Dtazv do
|
7
7
|
|
8
8
|
before :each do
|
9
|
-
@dtazv = KingDta::Dtazv.new(Date.
|
10
|
-
@
|
11
|
-
@
|
9
|
+
@dtazv = KingDta::Dtazv.new(Date.today)
|
10
|
+
@dudes_konto = dudes_konto
|
11
|
+
@dalai_lamas_account = dalai_lamas_account
|
12
|
+
|
13
|
+
@dtazv.account = KingDta::Account.new(
|
14
|
+
:account_number => @dudes_konto.account_number,
|
15
|
+
:bank_number => @dudes_konto.bank_number,
|
16
|
+
:client_name => @dudes_konto.client_name,
|
17
|
+
:client_number => @dudes_konto.client_number,
|
18
|
+
:bank_street => @dudes_konto.account_street,
|
19
|
+
:bank_city => @dudes_konto.account_city,
|
20
|
+
:bank_zip_code => @dudes_konto.account_zip_code,
|
21
|
+
:bank_name => @dudes_konto.bank_name,
|
22
|
+
:client_street => @dudes_konto.client_street,
|
23
|
+
:client_city => @dudes_konto.client_city,
|
24
|
+
:client_zip_code => @dudes_konto.client_zip_code,
|
25
|
+
:bank_country_code => @dudes_konto.bank_country_code,
|
26
|
+
:client_country_code => @dudes_konto.client_country_code
|
27
|
+
)
|
28
|
+
|
29
|
+
@dalai_lamas_booking = KingDta::Booking.new(KingDta::Account.new(
|
30
|
+
:account_number => @dalai_lamas_account.account_number,
|
31
|
+
:bank_number => @dalai_lamas_account.bank_number,
|
32
|
+
:client_name => @dalai_lamas_account.client_name,
|
33
|
+
:client_number => @dalai_lamas_account.client_number,
|
34
|
+
:bank_street => @dalai_lamas_account.account_street,
|
35
|
+
:bank_city => @dalai_lamas_account.account_city,
|
36
|
+
:bank_zip_code => @dalai_lamas_account.account_zip_code,
|
37
|
+
:bank_name => @dalai_lamas_account.bank_name,
|
38
|
+
:client_street => @dalai_lamas_account.client_street,
|
39
|
+
:client_city => @dalai_lamas_account.client_city,
|
40
|
+
:client_zip_code => @dalai_lamas_account.client_zip_code,
|
41
|
+
:bank_country_code => @dalai_lamas_account.bank_country_code,
|
42
|
+
:client_country_code => @dalai_lamas_account.client_country_code
|
43
|
+
), 220.25)
|
44
|
+
|
12
45
|
end
|
13
46
|
|
14
47
|
it "should init without values" do
|
@@ -29,26 +62,42 @@ describe KingDta::Dtazv do
|
|
29
62
|
|
30
63
|
it "should create file" do
|
31
64
|
@dtazv.default_text = 'Default Verwendungszweck'
|
32
|
-
6.times { @dtazv.add(@
|
65
|
+
6.times { @dtazv.add(@dalai_lamas_booking) }
|
33
66
|
# create test output file in spec dir
|
34
67
|
filename = File.join(File.dirname(__FILE__), 'test_output.dta')
|
35
68
|
@dtazv.create_file(filename)
|
36
69
|
str = ''
|
37
|
-
File.open(filename, 'r').each
|
70
|
+
File.open(filename, 'r').each do |ln|
|
71
|
+
str << ln
|
72
|
+
end
|
38
73
|
str.length.should == 5120
|
39
74
|
#remove testfile
|
40
75
|
File.delete(filename)
|
41
76
|
end
|
42
77
|
|
43
78
|
it "should not add a booking if closed" do
|
44
|
-
@dtazv.add(@
|
79
|
+
@dtazv.add(@dalai_lamas_booking)
|
45
80
|
@dtazv.create
|
46
|
-
lambda{ @dtazv.add(@
|
81
|
+
lambda{ @dtazv.add(@dalai_lamas_booking) }.should raise_error(KingDta::Exception)
|
47
82
|
end
|
48
83
|
|
49
84
|
it "should not add a booking if closed" do
|
50
|
-
@dtazv.add(@
|
51
|
-
negative_booking = KingDta::Booking.new(KingDta::Account.new(
|
85
|
+
@dtazv.add(@dalai_lamas_booking)
|
86
|
+
negative_booking = KingDta::Booking.new(KingDta::Account.new(
|
87
|
+
:account_number => @dalai_lamas_account.account_number,
|
88
|
+
:bank_number => @dalai_lamas_account.bank_number,
|
89
|
+
:client_name => @dalai_lamas_account.client_name,
|
90
|
+
:client_number => @dalai_lamas_account.client_number,
|
91
|
+
:bank_street => @dalai_lamas_account.account_street,
|
92
|
+
:bank_city => @dalai_lamas_account.account_city,
|
93
|
+
:bank_zip_code => @dalai_lamas_account.account_zip_code,
|
94
|
+
:bank_name => @dalai_lamas_account.bank_name,
|
95
|
+
:client_street => @dalai_lamas_account.client_street,
|
96
|
+
:client_city => @dalai_lamas_account.client_city,
|
97
|
+
:client_zip_code => @dalai_lamas_account.client_zip_code,
|
98
|
+
:bank_country_code => @dalai_lamas_account.bank_country_code,
|
99
|
+
:client_country_code => @dalai_lamas_account.client_country_code
|
100
|
+
), -220.25)
|
52
101
|
lambda{ @dtazv.add(negative_booking) }.should raise_error(KingDta::Exception)
|
53
102
|
end
|
54
103
|
|
@@ -56,34 +105,53 @@ describe KingDta::Dtazv do
|
|
56
105
|
lambda{ @dtazv.create}.should raise_error(KingDta::Exception)
|
57
106
|
end
|
58
107
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
108
|
+
# TODO
|
109
|
+
# it "should create the whole dta string with a single booking" do
|
110
|
+
# @dtaus.default_text = 'Default verwendungszweck'
|
111
|
+
# @dtaus.add(@booking)
|
112
|
+
# str = @dtaus.create
|
113
|
+
# str.length.should == 512
|
114
|
+
# str.should include(@kto1.name.upcase)
|
115
|
+
# str.should include(@kto2.name.upcase)
|
116
|
+
# str.should include(@dtaus.default_text.upcase)
|
117
|
+
# out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
|
118
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
119
|
+
# "0128E 0000001000000000000000000000002787777000000000370400440000000022025 "
|
120
|
+
# str.should == out
|
121
|
+
# end
|
67
122
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
123
|
+
# TODO
|
124
|
+
# it "should create whole dta string with long booking text in extension" do
|
125
|
+
# @dtaus.add(@booking)
|
126
|
+
# @dtaus.bookings.first.text = 'Rgn R-3456-0102220 Monatsbeitrag 08/10 Freelancer Version Vielen Dank Ihre SalesKing GmbH'
|
127
|
+
# str = @dtaus.create
|
128
|
+
# str.length.should == 640
|
129
|
+
# str.should include(@kto2.name.upcase)
|
130
|
+
# out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
|
131
|
+
# "0274C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGRGN R-3456-0102220 MONATSBE1 0302ITRAG 08/10 FREELANCER VERS02ION VIELEN DANK IHRE SALESK 02ING GMBH "+
|
132
|
+
# "0128E 0000001000000000000000000000002787777000000000370400440000000022025 "
|
133
|
+
# str.should == out
|
134
|
+
# end
|
77
135
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
136
|
+
# TODO
|
137
|
+
# it "should create the whole dta string with a lot of bookings" do
|
138
|
+
# @dtaus.default_text = 'Default Verwendungszweck'
|
139
|
+
# 6.times { @dtaus.add(@booking) }
|
140
|
+
# str = @dtaus.create
|
141
|
+
# str.length.should == 1792
|
142
|
+
# str.should include(@kto1.name.upcase)
|
143
|
+
# str.should include(@kto2.name.upcase)
|
144
|
+
# str.should include(@dtaus.default_text.upcase)
|
145
|
+
# out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
|
146
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
147
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
148
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
149
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
150
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
151
|
+
# "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
|
152
|
+
# "0128E 0000006000000000000000000000016726662000000002222402640000000132150 "
|
153
|
+
# str.should == out
|
154
|
+
# end
|
87
155
|
|
88
156
|
end
|
89
157
|
|
@@ -91,71 +159,104 @@ describe "KingDta::DtazvSegments" do
|
|
91
159
|
|
92
160
|
before :each do
|
93
161
|
@date = Date.today
|
94
|
-
@
|
95
|
-
@
|
96
|
-
@
|
97
|
-
|
98
|
-
|
162
|
+
@dudes_dtazv_export = KingDta::Dtazv.new(@date)
|
163
|
+
@dudes_konto = dudes_konto
|
164
|
+
@dalai_lamas_account = dalai_lamas_account
|
165
|
+
@dudes_dtazv_export.account = KingDta::Account.new(
|
166
|
+
:account_number => @dudes_konto.account_number,
|
167
|
+
:bank_number => @dudes_konto.bank_number,
|
168
|
+
:client_name => @dudes_konto.client_name,
|
169
|
+
:bank_name => @dudes_konto.bank_name,
|
170
|
+
:client_number => @dudes_konto.client_number,
|
171
|
+
:bank_street => @dudes_konto.account_street,
|
172
|
+
:bank_city => @dudes_konto.account_city,
|
173
|
+
:bank_zip_code => @dudes_konto.account_zip_code,
|
174
|
+
:client_street => @dudes_konto.client_street,
|
175
|
+
:client_city => @dudes_konto.client_city,
|
176
|
+
:client_zip_code => @dudes_konto.client_zip_code,
|
177
|
+
:bank_country_code => @dudes_konto.bank_country_code,
|
178
|
+
:client_country_code => @dudes_konto.client_country_code
|
179
|
+
)
|
180
|
+
|
181
|
+
@dalai_lamas_booking = KingDta::Booking.new(KingDta::Account.new(
|
182
|
+
:account_number => @dalai_lamas_account.account_number,
|
183
|
+
:bank_number => @dalai_lamas_account.bank_number,
|
184
|
+
:client_name => @dalai_lamas_account.client_name,
|
185
|
+
:bank_name => @dalai_lamas_account.bank_name,
|
186
|
+
:client_number => @dalai_lamas_account.client_number,
|
187
|
+
:bank_street => @dalai_lamas_account.account_street,
|
188
|
+
:bank_city => @dalai_lamas_account.account_city,
|
189
|
+
:bank_zip_code => @dalai_lamas_account.account_zip_code,
|
190
|
+
:client_street => @dalai_lamas_account.client_street,
|
191
|
+
:client_city => @dalai_lamas_account.client_city,
|
192
|
+
:client_zip_code => @dalai_lamas_account.client_zip_code,
|
193
|
+
:bank_country_code => @dalai_lamas_account.bank_country_code,
|
194
|
+
:client_country_code => @dalai_lamas_account.client_country_code
|
195
|
+
), 220.25)
|
196
|
+
|
197
|
+
@bookings = []
|
198
|
+
@bookings << @dalai_lamas_booking
|
99
199
|
end
|
100
200
|
|
101
201
|
|
102
202
|
# P SEGMENT NOT IMPLEMENTED AND USED YET
|
103
203
|
# it "should return the proper P segment" do
|
104
|
-
# @
|
204
|
+
# @dudes_dtazv_export.add_p.should == "0256P37040044 Commerzbank K\303\266ln 5th avenue 55323 los angeles11060801 "
|
105
205
|
# end
|
106
206
|
|
107
207
|
# it "should return the proper length of P segment" do
|
108
|
-
# @
|
208
|
+
# @dudes_dtazv_export.add_p.size.should == 256
|
109
209
|
# end
|
110
210
|
|
111
211
|
it "should return the proper Q segment" do
|
112
|
-
@
|
212
|
+
@dudes_dtazv_export.add_q.should == "0256Q370502991326049634JAN KUS MEINE EINE STRASSE 2 51063 MEINE KOELN #{@date.strftime("%y%m%d")}01#{@date.strftime("%y%m%d")}N0000000000 "
|
113
213
|
end
|
114
214
|
|
115
215
|
it "should return the proper length of P segment" do
|
116
|
-
@
|
216
|
+
@dudes_dtazv_export.add_q.size.should == 256
|
117
217
|
end
|
118
218
|
|
119
219
|
it "should return the proper T segment" do
|
120
|
-
@
|
220
|
+
@dudes_dtazv_export.add_t(@dalai_lamas_booking).should == "0768T37050299EUR1326049634#{@date.strftime("%y%m%d")}00000000 0000000000MARKF1100 DE DALAI LAMA BUSH-AVENUE 55 445555 INDIA /GR1601101250000000012300695 EUR00000000000220250 00000000 0013 0 00"
|
221
|
+
|
121
222
|
end
|
122
223
|
|
123
224
|
it "should return the proper length of T segment" do
|
124
|
-
@
|
225
|
+
@dudes_dtazv_export.add_t(@dalai_lamas_booking).size.should == 768
|
125
226
|
end
|
126
227
|
|
127
228
|
# V SEGMENT NOT IMPLEMENTED AND USED YET
|
128
229
|
# it "should return the proper V segment" do
|
129
|
-
# @
|
230
|
+
# @dudes_dtazv_export.add_t.should == "..........."
|
130
231
|
# end
|
131
232
|
|
132
233
|
# it "should return the proper length of V segment" do
|
133
|
-
# @
|
234
|
+
# @dudes_dtazv_export.add_t.size.should == 256
|
134
235
|
# end
|
135
236
|
|
136
237
|
# W SEGMENT NOT IMPLEMENTED AND USED YET
|
137
238
|
# it "should return the proper W segment" do
|
138
|
-
# @
|
239
|
+
# @dudes_dtazv_export.add_t.should == "..........."
|
139
240
|
# end
|
140
241
|
|
141
242
|
# it "should return the proper length of W segment" do
|
142
|
-
# @
|
243
|
+
# @dudes_dtazv_export.add_t.size.should == 256
|
143
244
|
# end
|
144
245
|
|
145
246
|
it "should return the proper Y segment" do
|
146
|
-
@
|
247
|
+
@dudes_dtazv_export.add_y(@bookings).should == "0256Y000000000000000000000000000000000000000000000000000000000000000000000001 "
|
147
248
|
end
|
148
249
|
|
149
250
|
it "should return the proper length of Y segment" do
|
150
|
-
@
|
251
|
+
@dudes_dtazv_export.add_y(@bookings).size.should == 256
|
151
252
|
end
|
152
253
|
|
153
254
|
it "should return the proper Z segment" do
|
154
|
-
@
|
255
|
+
@dudes_dtazv_export.add_z(@bookings).should == "0256Z000000000000220000000000000001 "
|
155
256
|
end
|
156
257
|
|
157
258
|
it "should return the proper length of Z segment" do
|
158
|
-
@
|
259
|
+
@dudes_dtazv_export.add_z(@bookings).size.should == 256
|
159
260
|
end
|
160
261
|
|
161
262
|
# TODO
|
data/spec/dtazv_test.rb
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
$:.unshift(File.dirname(__FILE__))
|
2
|
+
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require "king_dtaus"
|
6
|
+
require 'rspec'
|
7
|
+
require 'ostruct'
|
8
|
+
require 'date'
|
9
|
+
|
10
|
+
class Dtazv
|
11
|
+
|
12
|
+
def dudes_konto
|
13
|
+
opts = {
|
14
|
+
:account_number => '1326049634',
|
15
|
+
:bank_number => '37050299',
|
16
|
+
:bank_name => 'Kreissparkasse Köln',
|
17
|
+
:zweck => 'Monatsbeitrag',
|
18
|
+
:account_street => "Bank Eine Straße 2",
|
19
|
+
:account_city => "Bank Köln",
|
20
|
+
:account_zip_code => "51063",
|
21
|
+
:client_number => "",
|
22
|
+
:client_name =>'Jan Kus',
|
23
|
+
:client_street => "Meine Eine Straße 2",
|
24
|
+
:client_city => "Meine Köln",
|
25
|
+
:client_zip_code => "51063",
|
26
|
+
:bank_country_code => "DE",
|
27
|
+
:client_country_code => "DE"
|
28
|
+
}
|
29
|
+
TestKonto.new(opts)
|
30
|
+
end
|
31
|
+
|
32
|
+
def dalai_lamas_account
|
33
|
+
opts = {
|
34
|
+
:account_number => 'GR1601101250000000012300695',
|
35
|
+
:bank_number => 'MARKF1100',
|
36
|
+
:bank_name => 'India Bank',
|
37
|
+
:zweck => 'Lama-Fee',
|
38
|
+
:account_street => "5th avenue",
|
39
|
+
:account_city => "los angeles",
|
40
|
+
:account_zip_code => "55323",
|
41
|
+
:client_number => "",
|
42
|
+
:client_name =>'Dalai Lama',
|
43
|
+
:client_street => "Bush-Avenue 55",
|
44
|
+
:client_city => "Kuba",
|
45
|
+
:client_zip_code => "066600",
|
46
|
+
:client_zip_code => "445555",
|
47
|
+
:bank_country_code => "DE",
|
48
|
+
:client_country_code => "DE"
|
49
|
+
}
|
50
|
+
TestKonto.new(opts)
|
51
|
+
end
|
52
|
+
|
53
|
+
# The DTAVZ format as string. All data is appended to it during creation
|
54
|
+
def dta_string
|
55
|
+
@dta_string ||= ''
|
56
|
+
end
|
57
|
+
|
58
|
+
def create_dtazv
|
59
|
+
@date = Date.today
|
60
|
+
@dudes_dtazv_export = KingDta::Dtazv.new(@date)
|
61
|
+
@dudes_konto = self.dudes_konto
|
62
|
+
@dalai_lamas_account = self.dalai_lamas_account
|
63
|
+
@dudes_dtazv_export.account = KingDta::Account.new(
|
64
|
+
:account_number => @dudes_konto.account_number,
|
65
|
+
:bank_number => @dudes_konto.bank_number,
|
66
|
+
:client_name => @dudes_konto.client_name,
|
67
|
+
:client_number => @dudes_konto.client_number,
|
68
|
+
:bank_street => @dudes_konto.account_street,
|
69
|
+
:bank_city => @dudes_konto.account_city,
|
70
|
+
:bank_zip_code => @dudes_konto.account_zip_code,
|
71
|
+
:bank_name => @dudes_konto.bank_name,
|
72
|
+
:client_street => @dudes_konto.client_street,
|
73
|
+
:client_city => @dudes_konto.client_city,
|
74
|
+
:client_zip_code => @dudes_konto.client_zip_code,
|
75
|
+
:bank_country_code => @dudes_konto.bank_country_code,
|
76
|
+
:client_country_code => @dudes_konto.client_country_code
|
77
|
+
)
|
78
|
+
|
79
|
+
@dalai_lamas_booking = KingDta::Booking.new(KingDta::Account.new(
|
80
|
+
:account_number => @dalai_lamas_account.account_number,
|
81
|
+
:bank_number => @dalai_lamas_account.bank_number,
|
82
|
+
:client_name => @dalai_lamas_account.client_name,
|
83
|
+
:client_number => @dalai_lamas_account.client_number,
|
84
|
+
:bank_street => @dalai_lamas_account.account_street,
|
85
|
+
:bank_city => @dalai_lamas_account.account_city,
|
86
|
+
:bank_zip_code => @dalai_lamas_account.account_zip_code,
|
87
|
+
:bank_name => @dalai_lamas_account.bank_name,
|
88
|
+
:client_street => @dalai_lamas_account.client_street,
|
89
|
+
:client_city => @dalai_lamas_account.client_city,
|
90
|
+
:client_zip_code => @dalai_lamas_account.client_zip_code,
|
91
|
+
:bank_country_code => @dalai_lamas_account.bank_country_code,
|
92
|
+
:client_country_code => @dalai_lamas_account.client_country_code
|
93
|
+
), 220.25)
|
94
|
+
|
95
|
+
@dudes_dtazv_export.add(@dalai_lamas_booking)
|
96
|
+
@dudes_dtazv_export.create_file
|
97
|
+
end
|
98
|
+
|
99
|
+
# the test account responds to everything
|
100
|
+
class TestKonto < OpenStruct; end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
d = Dtazv.new
|
105
|
+
d.create_dtazv
|
data/spec/spec_helper.rb
CHANGED
@@ -15,76 +15,98 @@ require 'date'
|
|
15
15
|
RSpec.configure do |config|
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
18
|
+
|
19
|
+
#Filename der eigenen Kontodaten
|
20
|
+
# Beispiel:
|
21
|
+
# typ:LK
|
22
|
+
# blz:99988811
|
23
|
+
# konto:123456
|
24
|
+
# bank:Nord-Ostschwaebische Sandbank
|
25
|
+
#
|
26
|
+
# name:Jodelverein Holladrioe 1863 e.V.
|
27
|
+
# zweck:Mitgliedsbeitrag 2003
|
28
|
+
# Der Typ ist LK oder GK. Siehe Option -t
|
29
|
+
# zweck ist ein optionaler Default-Text, der verwendet wird,
|
30
|
+
# falls eine Buchung keinen Text hat.
|
31
|
+
# Die Adressdaten der Bank sind optional und werdezum erzeugen
|
32
|
+
# des Begleitblatts verwendet
|
33
|
+
# bankstrasse:Kieselweg 3
|
34
|
+
# bankplz:0815
|
35
|
+
# bankort:Felsblock
|
36
|
+
|
37
|
+
def dudes_konto
|
38
|
+
opts = {
|
39
|
+
:account_number => '1326049634',
|
40
|
+
:bank_number => '37050299',
|
41
|
+
:bank_name => 'Kreissparkasse Köln',
|
42
|
+
:zweck => 'Monatsbeitrag',
|
43
|
+
:account_street => "Bank Eine Straße 2",
|
44
|
+
:account_city => "Bank Köln",
|
45
|
+
:account_zip_code => "51063",
|
46
|
+
:client_number => "",
|
47
|
+
:client_name =>'Jan Kus',
|
48
|
+
:client_street => "Meine Eine Straße 2",
|
49
|
+
:client_city => "Meine Köln",
|
50
|
+
:client_zip_code => "51063",
|
51
|
+
:bank_country_code => "DE",
|
52
|
+
:client_country_code => "DE"
|
53
|
+
}
|
54
|
+
TestKonto.new(opts)
|
35
55
|
end
|
36
56
|
|
37
|
-
def
|
38
|
-
{
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
def dalai_lamas_account
|
58
|
+
opts = {
|
59
|
+
:account_number => 'GR1601101250000000012300695',
|
60
|
+
:bank_number => 'MARKF1100',
|
61
|
+
:bank_name => 'Dalai Lamas Bank',
|
62
|
+
:zweck => 'Lama Fee',
|
63
|
+
:account_street => "5th avenue",
|
64
|
+
:account_city => "los angeles",
|
65
|
+
:account_zip_code => "55323",
|
66
|
+
:client_number => "",
|
67
|
+
:client_name =>'Dalai Lama',
|
68
|
+
:client_street => "Bush-Avenue 55",
|
69
|
+
:client_city => "India",
|
70
|
+
:client_zip_code => "066600",
|
71
|
+
:client_zip_code => "445555",
|
72
|
+
:bank_country_code => "DE",
|
73
|
+
:client_country_code => "DE"
|
74
|
+
}
|
75
|
+
TestKonto.new(opts)
|
54
76
|
end
|
55
77
|
|
56
78
|
def test_kto1
|
57
79
|
opts = {
|
58
|
-
:
|
80
|
+
:account_number => '7828970037',
|
59
81
|
:bank_number => '37040044',
|
60
|
-
:
|
82
|
+
:client_name =>'Gimme your Money AG',
|
61
83
|
:bank_name => 'Commerzbank Köln',
|
62
84
|
:zweck => 'Monatsbeitrag',
|
63
|
-
:
|
85
|
+
:client_number => ""
|
64
86
|
}
|
65
87
|
TestKonto.new(opts)
|
66
88
|
end
|
67
89
|
|
68
90
|
def test_kto2
|
69
91
|
opts = {
|
70
|
-
:
|
92
|
+
:account_number => '2787777',
|
71
93
|
:bank_number => '37040044',
|
72
|
-
:
|
94
|
+
:client_name =>'Peter & May GmbH',
|
73
95
|
:bank_name => 'Commerzbank Köln',
|
74
96
|
:zweck => 'Monatsbeitrag',
|
75
|
-
:
|
97
|
+
:client_number => ""
|
76
98
|
}
|
77
99
|
TestKonto.new(opts)
|
78
100
|
end
|
79
101
|
|
80
102
|
def test_kto3
|
81
103
|
opts = {
|
82
|
-
:
|
104
|
+
:account_number => '2787777',
|
83
105
|
:bank_number => '37040044',
|
84
|
-
:
|
106
|
+
:client_name =>'Andrew Müller',
|
85
107
|
:bank_name => 'Commerzbank Köln',
|
86
108
|
:zweck => 'Monatsbeitrag',
|
87
|
-
:
|
109
|
+
:client_number => ""
|
88
110
|
}
|
89
111
|
TestKonto.new(opts)
|
90
112
|
end
|