king_dtaus 2.0.4.pre → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/Gemfile +1 -6
- data/README.markdown +49 -50
- data/Rakefile +11 -24
- data/king_dtaus.gemspec +22 -64
- data/lib/king_dta/account.rb +37 -16
- data/lib/king_dta/booking.rb +7 -3
- data/lib/king_dta/dtaus.rb +8 -8
- data/lib/king_dta/dtazv.rb +11 -14
- data/lib/king_dta/version.rb +3 -0
- data/spec/account_spec.rb +46 -12
- data/spec/dtaus_spec.rb +23 -0
- data/spec/dtazv_spec.rb +13 -0
- data/spec/spec_helper.rb +28 -15
- metadata +115 -118
- data/VERSION +0 -1
- data/docs/dtazv.pdf +0 -0
- data/docs/dtazv_bank_bbk.pdf +0 -0
- data/docs/example.output +0 -7
data/.gitignore
ADDED
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -18,38 +18,35 @@ We love building payment applications.
|
|
18
18
|
|
19
19
|
## Features
|
20
20
|
|
21
|
-
* Create DTAUS debit
|
22
|
-
* Create DTAUS credit
|
23
|
-
* Create DTAZV debit
|
24
|
-
*
|
21
|
+
* Create DTAUS debit transfer (Lastschrift)
|
22
|
+
* Create DTAUS credit transfer (Gutschrift)
|
23
|
+
* Create DTAZV debit transfer
|
24
|
+
* 100% test coverage to ensure software quality
|
25
|
+
* works with ruby 1.8 & 1.9.2
|
25
26
|
|
26
|
-
##
|
27
|
+
## Version Info
|
27
28
|
|
28
|
-
|
29
|
+
Version 2 has breaking changes!
|
29
30
|
|
30
31
|
* account attributes now passed in as hash
|
31
|
-
* renamed
|
32
|
-
* renamed account.account_number
|
32
|
+
* renamed account.client_xy => owner_xy
|
33
|
+
* renamed account.account_number => bank_account_number
|
33
34
|
* added iban/bic to account
|
34
35
|
* DTAZV added
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
gem
|
39
|
-
# or add a pre version to your Gemfile
|
40
|
-
gem 'king_dtaus', '2.0.3.pre'
|
37
|
+
If you want to stay with v1 just pin it in your Gemfile:
|
38
|
+
|
39
|
+
gem "king_dtaus", "<2"
|
41
40
|
|
42
41
|
## TODOs
|
43
42
|
|
44
|
-
*
|
45
|
-
* some more edge-case tests needed
|
43
|
+
* some more edge-case tests needed, we need your feedback here!
|
46
44
|
|
47
45
|
## Resources
|
48
46
|
|
49
47
|
* SalesKing: http://salesking.eu
|
50
48
|
* DTAZV-Viewer: http://www.meta-evolutions.de/pages/artikel-20070630-dtazv-datei-betrachter.html
|
51
49
|
* DTA/DTAZV PHP Pear: http://pear.php.net/package/Payment_DTA
|
52
|
-
* Ruby Kernel Module: http://www.ruby-doc.org/core/classes/Kernel.html
|
53
50
|
* Windata ZV-Tools: http://www.windata.de/Site/2Produkte2/ZVTools.aspx
|
54
51
|
* The Swift Codes: http://www.theswiftcodes.com/
|
55
52
|
* StarMoney: http://www.starmoney.de/index.php?id=starmoneybusiness_testen
|
@@ -60,63 +57,68 @@ Here are some examples how to create a DTA- or DTAZV-File. Also check out the sp
|
|
60
57
|
|
61
58
|
### DTA
|
62
59
|
|
63
|
-
|
64
|
-
|
60
|
+
```ruby
|
61
|
+
# create a new dtaus object
|
62
|
+
dta = KingDta::Dtaus.new('LK')
|
65
63
|
|
66
|
-
|
67
|
-
|
64
|
+
# set sender account
|
65
|
+
dta.account = KingDta::Account.new(
|
68
66
|
:bank_account_number => "123456789",
|
69
67
|
:bank_number => "69069096",
|
70
68
|
:owner_name => "Return to Sender",
|
71
69
|
:bank_name => "Money Burner Bank")
|
72
70
|
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
# following should be done in a loop to add multiple bookings
|
72
|
+
# create receiving account
|
73
|
+
receiver = KingDta::Account.new(
|
76
74
|
:bank_account_number => "987456123",
|
77
75
|
:bank_number => "99099096",
|
78
76
|
:owner_name => "Gimme More Lt.",
|
79
77
|
:bank_name => "Banking Bandits")
|
80
|
-
|
81
|
-
|
78
|
+
# create booking
|
79
|
+
booking = KingDta::Booking.new(receiver, 100.00 )
|
82
80
|
|
83
|
-
|
84
|
-
|
81
|
+
# set booking text if you want to
|
82
|
+
booking.text = "Thanks for your purchase"
|
85
83
|
|
86
|
-
|
87
|
-
|
88
|
-
|
84
|
+
# add booking
|
85
|
+
dta.add( booking )
|
86
|
+
# end loop
|
89
87
|
|
90
|
-
|
91
|
-
|
88
|
+
# create datausstring and do with it whatever fits your workflow
|
89
|
+
my_str = dta.create
|
92
90
|
|
91
|
+
```
|
93
92
|
### DTAZV
|
94
93
|
|
95
|
-
|
94
|
+
```ruby
|
95
|
+
@dtazv = KingDta::Dtazv.new()
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
# sender account
|
98
|
+
@dtazv.account = KingDta::Account.new(
|
99
99
|
:bank_account_number => "123456789",
|
100
100
|
:bank_number => "40050100",
|
101
101
|
:bank_name => "Greedy Fuckers Bank",
|
102
102
|
:owner_name => "Sender name"
|
103
|
-
|
103
|
+
)
|
104
104
|
|
105
|
-
|
106
|
-
|
105
|
+
# receiver account
|
106
|
+
receiver = KingDta::Account.new(
|
107
107
|
:bank_account_number => "987654321",
|
108
108
|
:bank_iban => "PLsome-long-Iban",
|
109
109
|
:bank_bic => "BicCode",
|
110
110
|
:owner_name => "receivers name"
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
)
|
112
|
+
|
113
|
+
# add bookings, probably in a loop
|
114
|
+
booking = KingDta::Booking.new(receiver, 220.25)
|
115
|
+
@dtazv.add(booking)
|
115
116
|
|
116
|
-
|
117
|
-
|
117
|
+
# get output as string
|
118
|
+
@dtazv.create
|
119
|
+
```
|
118
120
|
|
119
|
-
also make sure to read the specs
|
121
|
+
also make sure to read the code and the specs
|
120
122
|
|
121
123
|
## Credits
|
122
124
|
|
@@ -126,9 +128,6 @@ Bugfixes and enhancements by
|
|
126
128
|
* Kim Rudolph - https://github.com/krudolph
|
127
129
|
* Thorsten Böttger - https://github.com/alto
|
128
130
|
* Jan Kus - https://github.com/koos
|
131
|
+
* used https://rubygems.org/gems/DTAUS as a starting point
|
129
132
|
|
130
|
-
|
131
|
-
It was disected, turned into a real class structure, bugs were fixed and
|
132
|
-
of course a full test suite ensures its functionality.
|
133
|
-
|
134
|
-
Copyright (c) 2009-2011 Georg Leciejewski (SalesKing), Jan Kus (Railslove), released under the MIT license
|
133
|
+
Copyright (c) 2009-2011 Georg Leciejewski (SalesKing), Jan Kus (Railslove), released under the MIT license
|
data/Rakefile
CHANGED
@@ -1,31 +1,18 @@
|
|
1
1
|
require 'rake'
|
2
|
+
require 'rspec'
|
2
3
|
require 'rspec/core/rake_task'
|
3
|
-
|
4
|
+
require 'rdoc/task'
|
5
|
+
require 'bundler/gem_helper'
|
6
|
+
Bundler::GemHelper.install_tasks
|
4
7
|
desc "Run specs"
|
5
8
|
RSpec::Core::RakeTask.new
|
6
|
-
|
7
9
|
task :default => :spec
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
begin
|
18
|
-
require 'jeweler'
|
19
|
-
Jeweler::Tasks.new do |gem|
|
20
|
-
gem.name = "king_dtaus"
|
21
|
-
gem.summary = %Q{Generate DTAUS strings and files}
|
22
|
-
gem.description = %Q{DTAUS is a text-based format, to create bank transfers for german banks. This gem helps with the creation of those transfer files.}
|
23
|
-
gem.email = "gl@salesking.eu"
|
24
|
-
gem.homepage = "http://github.com/salesking/king_dtaus"
|
25
|
-
gem.authors = ["Georg Leciejewski", "Georg Ledermann", "Jan Kus"]
|
26
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
27
|
-
end
|
28
|
-
Jeweler::GemcutterTasks.new
|
29
|
-
rescue LoadError
|
30
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
11
|
+
desc 'Generate documentation'
|
12
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
13
|
+
rdoc.rdoc_dir = 'docs/rdoc'
|
14
|
+
rdoc.title = 'KingPdf'
|
15
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
16
|
+
rdoc.rdoc_files.include('README')
|
17
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
31
18
|
end
|
data/king_dtaus.gemspec
CHANGED
@@ -1,76 +1,34 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'king_dta/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.name = %q{king_dtaus}
|
8
|
-
s.version =
|
7
|
+
s.version = KingDta::VERSION
|
9
8
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{2011-
|
13
|
-
s.
|
9
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
10
|
+
s.authors = ['Georg Leciejewski', 'Georg Ledermann', 'Jan Kus']
|
11
|
+
s.date = %q{2011-11-15}
|
12
|
+
s.summary = %q{Generate DTA/DTAUS and DTAZV bank transfer files .. the easy way}
|
13
|
+
s.description = %q{DTA/DTAUS and DTAZV are text-based formats to create bank transfers for german banks.
|
14
|
+
This gem creates DTA/DATAUS files for inner german credit and debit(Gutschrift/Lastschrift) transfers.
|
15
|
+
It is also capable of creating DTAZV credit-files for transfers from Germany to European SEPA region.}
|
14
16
|
s.email = %q{gl@salesking.eu}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
|
17
|
-
]
|
18
|
-
s.files
|
19
|
-
|
20
|
-
"Gemfile",
|
21
|
-
"MIT-LICENSE",
|
22
|
-
"README.markdown",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"docs/dtazv.pdf",
|
26
|
-
"docs/dtazv_bank_bbk.pdf",
|
27
|
-
"docs/example.output",
|
28
|
-
"king_dtaus.gemspec",
|
29
|
-
"lib/king_dta/account.rb",
|
30
|
-
"lib/king_dta/booking.rb",
|
31
|
-
"lib/king_dta/dta.rb",
|
32
|
-
"lib/king_dta/dtaus.rb",
|
33
|
-
"lib/king_dta/dtazv.rb",
|
34
|
-
"lib/king_dta/exception.rb",
|
35
|
-
"lib/king_dta/helper.rb",
|
36
|
-
"lib/king_dtaus.rb",
|
37
|
-
"spec/account_spec.rb",
|
38
|
-
"spec/booking_spec.rb",
|
39
|
-
"spec/dtaus_spec.rb",
|
40
|
-
"spec/dtazv_spec.rb",
|
41
|
-
"spec/helper_spec.rb",
|
42
|
-
"spec/spec_helper.rb"
|
43
|
-
]
|
17
|
+
s.extra_rdoc_files = ['README.markdown']
|
18
|
+
s.executables = nil
|
19
|
+
s.files = `git ls-files`.split("\n").reject{|i| i[/^docs\//] }
|
20
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
|
44
22
|
s.homepage = %q{http://github.com/salesking/king_dtaus}
|
45
|
-
s.require_paths = [
|
23
|
+
s.require_paths = ['lib']
|
46
24
|
s.rubygems_version = %q{1.6.2}
|
47
|
-
s.summary = %q{Generate DTAUS strings and files}
|
48
25
|
|
49
|
-
|
50
|
-
|
26
|
+
s.add_runtime_dependency 'i18n'
|
27
|
+
s.add_development_dependency 'rdoc'
|
28
|
+
s.add_development_dependency 'rspec'
|
29
|
+
s.add_development_dependency 'simplecov'
|
30
|
+
s.add_development_dependency 'mocha'
|
31
|
+
s.add_development_dependency 'rake', '>= 0.9.2'
|
51
32
|
|
52
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
-
s.add_runtime_dependency(%q<king_dtaus>, [">= 0"])
|
54
|
-
s.add_development_dependency(%q<rspec>, [">= 0"])
|
55
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
56
|
-
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
57
|
-
s.add_development_dependency(%q<mocha>, [">= 0"])
|
58
|
-
s.add_development_dependency(%q<i18n>, [">= 0"])
|
59
|
-
else
|
60
|
-
s.add_dependency(%q<king_dtaus>, [">= 0"])
|
61
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
62
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
63
|
-
s.add_dependency(%q<simplecov>, [">= 0"])
|
64
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
65
|
-
s.add_dependency(%q<i18n>, [">= 0"])
|
66
|
-
end
|
67
|
-
else
|
68
|
-
s.add_dependency(%q<king_dtaus>, [">= 0"])
|
69
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
70
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
71
|
-
s.add_dependency(%q<simplecov>, [">= 0"])
|
72
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
73
|
-
s.add_dependency(%q<i18n>, [">= 0"])
|
74
|
-
end
|
75
33
|
end
|
76
34
|
|
data/lib/king_dta/account.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
module KingDta
|
3
|
-
#
|
4
|
-
# Kontodaten verwalten mit Name des Inhabers und Bank, Bankleitzahl und Kontonummer.
|
3
|
+
# Bank account and owner information
|
5
4
|
class Account
|
6
5
|
include KingDta::Helper
|
7
|
-
|
8
|
-
attr_accessor :
|
6
|
+
|
7
|
+
attr_accessor :bank_street, :bank_city,
|
9
8
|
:bank_zip, :bank_name, :bank_country_code, :bank_iban,
|
10
9
|
:bank_bic,
|
11
10
|
:owner_name, :owner_number, :owner_street, :owner_city,
|
12
11
|
:owner_zip_code, :owner_country_code
|
12
|
+
attr_reader :bank_account_number, :bank_number
|
13
13
|
|
14
|
-
# TODO test
|
15
14
|
def initialize(args={})
|
15
|
+
args = args.dup
|
16
16
|
|
17
17
|
@bank_street = convert_text(args.delete(:bank_street))
|
18
18
|
@bank_city = convert_text(args.delete(:bank_city))
|
@@ -26,23 +26,44 @@ module KingDta
|
|
26
26
|
end
|
27
27
|
|
28
28
|
raise ArgumentError.new('Owner number too long, max 10 allowed') if @owner_number && "#{@owner_number}".length > 10
|
29
|
-
raise ArgumentError.new(
|
30
|
-
raise ArgumentError.new(
|
31
|
-
raise ArgumentError.new(
|
29
|
+
raise ArgumentError.new('Owner street too long, max 35 allowed') if @owner_street && @owner_street.length > 35
|
30
|
+
raise ArgumentError.new('Owner city too long, max 35 allowed') if @owner_city && @owner_city.length > 35
|
31
|
+
raise ArgumentError.new('Owner country code too long, max 2 allowed') if @owner_country_code && @owner_country_code.length > 2
|
32
|
+
|
32
33
|
|
33
|
-
raise ArgumentError.new('Bank account number too long, max 35 allowed') if @bank_account_number && "#{@bank_account_number}".length > 35
|
34
|
-
raise ArgumentError.new("Bank account number cannot be 0") if @bank_account_number && @bank_account_number == 0
|
35
34
|
raise ArgumentError.new("Bank iban wrong length: #{@bank_iban.length}, must be between 15-34") if @bank_iban && !@bank_iban.length.between?(15,34)
|
36
35
|
raise ArgumentError.new("Bank bic wrong length: #{@bank_bic.length} must be between 8-11") if @bank_bic && !@bank_bic.length.between?(8,11)
|
37
|
-
|
38
|
-
raise ArgumentError.new(
|
39
|
-
raise ArgumentError.new(
|
40
|
-
raise ArgumentError.new(
|
41
|
-
raise ArgumentError.new(
|
42
|
-
raise ArgumentError.new("Bank country code too long, max 2 allowed") if @bank_country_code && @bank_country_code.length > 2
|
36
|
+
|
37
|
+
raise ArgumentError.new('Bank street too long, max 35 allowed') if @bank_street && @bank_street.length > 35
|
38
|
+
raise ArgumentError.new('Bank city too long, max 35 allowed') if @bank_city && @bank_city.length > 35
|
39
|
+
raise ArgumentError.new('Bank name too long, max 35 allowed') if @bank_name && @bank_name.length > 35
|
40
|
+
raise ArgumentError.new('Bank country code too long, max 2 allowed') if @bank_country_code && @bank_country_code.length > 2
|
43
41
|
|
44
42
|
@owner_country_code = @bank_iban[0..1 ] if @bank_iban && !@owner_country_code
|
43
|
+
end
|
44
|
+
|
45
|
+
# Cast given account number to integer. Strips spaces and leading zeros
|
46
|
+
# from the bank account number.
|
47
|
+
# DTA relies on integers for checksums and field values.
|
48
|
+
# @param [String|Integer] number
|
49
|
+
def bank_account_number=(number)
|
50
|
+
nr_str = "#{number}".gsub(/\s/,'')
|
51
|
+
raise ArgumentError.new('Bank account number too long, max 10 allowed') if nr_str.length > 10
|
52
|
+
raise ArgumentError.new('Bank account number cannot be 0') if nr_str == '0'
|
53
|
+
|
54
|
+
@bank_account_number = nr_str.to_i
|
55
|
+
end
|
56
|
+
|
57
|
+
# Cast given bank number to integer. Strips spaces and leading zeros
|
58
|
+
# from the bank account number.
|
59
|
+
# DTA relies on integers for checksums and field values.
|
60
|
+
# @param [String|Integer] number
|
61
|
+
def bank_number=(number)
|
62
|
+
nr_str = "#{number}".gsub(/\s/,'')
|
63
|
+
raise ArgumentError.new('Bank number too long, max 8 allowed') if nr_str.length > 8
|
64
|
+
raise ArgumentError.new('Bank number cannot be 0') if nr_str == '0'
|
45
65
|
|
66
|
+
@bank_number = nr_str.to_i
|
46
67
|
end
|
47
68
|
|
48
69
|
def bank_zip_city
|
data/lib/king_dta/booking.rb
CHANGED
@@ -8,17 +8,21 @@ module KingDta
|
|
8
8
|
LASTSCHRIFT_EINZUGSERMAECHTIGUNG = '05000'
|
9
9
|
UEBERWEISUNG_GUTSCHRIFT = '51000'
|
10
10
|
|
11
|
-
attr_accessor :value, :account, :text, :account_key
|
11
|
+
attr_accessor :value, :account, :text, :account_key, :currency, :charge_bearer_code
|
12
12
|
#Eine Buchung ist definiert durch:
|
13
13
|
#- Konto (siehe Klasse Konto
|
14
14
|
#- Betrag
|
15
15
|
# Der Betrag kann , oder . als Dezimaltrenner enthalten.
|
16
16
|
#- optional Buchungstext
|
17
|
-
def initialize( account, value, text=nil, account_key=nil )
|
17
|
+
def initialize( account, value, text=nil, account_key=nil, currency="EUR" )
|
18
18
|
raise Exception.new("Hey, a booking should have an Account") unless account.kind_of?( Account )
|
19
19
|
@account = account
|
20
20
|
@text = text ? convert_text( text ) : text
|
21
21
|
@account_key = account_key
|
22
|
+
if currency.size != 3
|
23
|
+
raise Exception.new("currency code needs to be 3 chars. You gave me: #{currency.inspect}")
|
24
|
+
end
|
25
|
+
@currency = currency
|
22
26
|
if value.is_a?(String)
|
23
27
|
value = BigDecimal.new value.sub(',', '.')
|
24
28
|
elsif value.is_a?(Numeric)
|
@@ -28,7 +32,7 @@ module KingDta
|
|
28
32
|
end
|
29
33
|
value = ( value * 100 ).to_i #€-Cent
|
30
34
|
if value == 0
|
31
|
-
raise Exception.new("A booking of 0.00
|
35
|
+
raise Exception.new("A booking of 0.00 #{@currency} makes no sense")
|
32
36
|
elsif value > 0
|
33
37
|
@value = value
|
34
38
|
@pos = true
|
data/lib/king_dta/dtaus.rb
CHANGED
@@ -36,8 +36,8 @@ module KingDta
|
|
36
36
|
def set_checksums
|
37
37
|
@sum_bank_account_numbers, @sum_bank_numbers, @sum_values = 0,0,0
|
38
38
|
bookings.each do |b|
|
39
|
-
@sum_bank_account_numbers += b.account.bank_account_number
|
40
|
-
@sum_bank_numbers += b.account.bank_number
|
39
|
+
@sum_bank_account_numbers += b.account.bank_account_number
|
40
|
+
@sum_bank_numbers += b.account.bank_number
|
41
41
|
@sum_values += b.value
|
42
42
|
end
|
43
43
|
end
|
@@ -63,7 +63,7 @@ module KingDta
|
|
63
63
|
# 11b 95 8 Ausführungsdatum Format DDMMJJJJ. max A7 + 15 Tage. Default Blanks.
|
64
64
|
# 11c 103 24 Reserviert, 24 Blanks
|
65
65
|
# 12 127 1 Währungskennzeichen "1" = Euro
|
66
|
-
#
|
66
|
+
#
|
67
67
|
# Insgesamt 128 Zeichen
|
68
68
|
def add_a
|
69
69
|
data = '0128'
|
@@ -74,7 +74,7 @@ module KingDta
|
|
74
74
|
data += '%-27.27s' % @account.owner_name
|
75
75
|
data += @date.strftime("%d%m%y") # creation date - today
|
76
76
|
data += ' ' * 4
|
77
|
-
data += '%010i' % @account.bank_account_number
|
77
|
+
data += '%010i' % @account.bank_account_number
|
78
78
|
data += '%010i' % 0
|
79
79
|
data += ' ' * 15
|
80
80
|
data += '%8s' % @date.strftime("%d%m%Y") #Ausführungsdatum - ja hier 8 Stellen
|
@@ -153,13 +153,13 @@ module KingDta
|
|
153
153
|
data1 = 'C'
|
154
154
|
data1 += '%08i' % 0
|
155
155
|
data1 += '%-08i' % booking.account.bank_number
|
156
|
-
data1 += '%010i' % booking.account.bank_account_number
|
156
|
+
data1 += '%010i' % booking.account.bank_account_number
|
157
157
|
data1 += '0%011i0' % (booking.account.owner_number || 0) #interne Kundennummer
|
158
158
|
data1 += zahlungsart
|
159
159
|
data1 += ' '
|
160
160
|
data1 += '0' * 11
|
161
161
|
data1 += '%08i' % @account.bank_number
|
162
|
-
data1 += '%010i' % @account.bank_account_number
|
162
|
+
data1 += '%010i' % @account.bank_account_number
|
163
163
|
data1 += '%011i' % booking.value #Betrag in Euro einschl. Nachkomma
|
164
164
|
data1 += ' ' * 3
|
165
165
|
data1 += '%-27.27s' % booking.account.owner_name
|
@@ -172,7 +172,7 @@ module KingDta
|
|
172
172
|
booking_txt = booking.text || default_text
|
173
173
|
#Erste 27 Zeichen
|
174
174
|
#if text < 26 fill with spaces
|
175
|
-
data2 +=
|
175
|
+
data2 += booking_txt[0..26].ljust(27)
|
176
176
|
booking_txt = booking_txt[27..999]
|
177
177
|
# cut text into 27 long pieces
|
178
178
|
while booking_txt && booking_txt.size > 0 && exts.size < 13
|
@@ -184,7 +184,7 @@ module KingDta
|
|
184
184
|
data2 += '1' #EUR
|
185
185
|
data2 += ' ' * 2
|
186
186
|
# Gesamte Satzlänge ermitteln ( data1(+4) + data2 + Erweiterungen )
|
187
|
-
data1 = "%04i#{data1}" % ( data1.size + 4 + data2.size+ 2 + exts.size * 29 )
|
187
|
+
data1 = "%04i#{data1}" % ( data1.size + 4 + data2.size + 2 + exts.size * 29 )
|
188
188
|
raise "DTAUS: Längenfehler C/1 #{data1.size} nicht 128, #{booking.account.owner_name}" unless data1.size == 128
|
189
189
|
dta_string << data1
|
190
190
|
#Anzahl Erweiterungen anfügen
|
data/lib/king_dta/dtazv.rb
CHANGED
@@ -35,9 +35,8 @@ module KingDta
|
|
35
35
|
# Datensatz Q - kurze Variante
|
36
36
|
# Die Bundesbank nimmt Q-Sätze in 2 Varianten entgegen. Die lange Variante ist identisch mit
|
37
37
|
# den von den Auftraggebern gelieferten Q-Sätzen. In der kurzen Variante sind nur die Felder
|
38
|
-
# enthalten, die von der Bundesbank bei der Bearbeitung der Meldungen benötigt werden
|
39
|
-
#
|
40
|
-
# kenntlich gemacht. Beide Varianten dürfen in einer Datei vorkommen.
|
38
|
+
# enthalten, die von der Bundesbank bei der Bearbeitung der Meldungen benötigt werden.
|
39
|
+
# Beide Varianten dürfen in einer Datei vorkommen.
|
41
40
|
# [ Anmerk.: Bei der Kurzen Variante entfällt die Kundennummer ]
|
42
41
|
#
|
43
42
|
# === Fields
|
@@ -45,7 +44,7 @@ module KingDta
|
|
45
44
|
# 1 1 4 Satzlänge numerisch bei Disketten und DFÜ
|
46
45
|
# 2 5 1 Satzart Konstante "Q"
|
47
46
|
# 3 6 8 BLZ Erstbeauftragtes Kreditinstitut
|
48
|
-
# 4 14 10
|
47
|
+
# 4 14 10 Kontonummer Auftraggeber Entfällt bei der kurzen Variante
|
49
48
|
# 5 24 4x35 Auftraggeberdaten Zeile 1 und 2: Name;
|
50
49
|
# Zeile 3: Straße/Postfach; Zeile 4: Ort
|
51
50
|
# 6 164 6 Erstellungsdatum Format: JJMMTT
|
@@ -67,7 +66,7 @@ module KingDta
|
|
67
66
|
data1 += @date.strftime("%y%m%d") # Erstellungsdatum
|
68
67
|
data1 += '01'
|
69
68
|
data1 += @date.strftime("%y%m%d") # Ausführungstermin
|
70
|
-
data1 += "N"
|
69
|
+
data1 += "N"
|
71
70
|
data1 += "%02i" % 0
|
72
71
|
data1 += '%08i' % 0
|
73
72
|
data1 += '%068s' % ''
|
@@ -112,13 +111,11 @@ module KingDta
|
|
112
111
|
# Pflicht, wenn T8 nicht belegt; nicht zu belegen bei Scheckziehungen,
|
113
112
|
# 9b 68 4x35 Anschrift Bank des Zahlungsempfängers. Pflicht wenn T8 nicht belegt
|
114
113
|
# Wenn Anschrift nicht bekannt„UNBEKANNT"
|
115
|
-
# Zeile 1 und 2: Name Zeile 3: Straße Zeile 4: Ort
|
114
|
+
# Zeile 1 und 2: Name Zeile 3: Straße Zeile 4: Ort
|
116
115
|
# Nicht zu belegen bei Scheckziehungen
|
117
116
|
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
# Scheckempfängers linksbündig zu belegen; 3. Stelle Leerzeichen
|
121
|
-
# 10b 4x35 211 alpha Zahlungsempfänger bzw. Bei Zahlungsauftrag: Zahlungsempfänger Bei P P Angabe eines Scheckempfängers nicht P Angabe eines Scheck empfängers nicht möglich
|
117
|
+
# 10a 208 3 2-stelliger ISO-alpha-Ländercode des Zahlungsempfänger gemäß Länderverzeichnis für die Zahlungsbilanzstatistik; linksbündig zu belegen; 3. Stelle Leerzeichen
|
118
|
+
# 10b 211 4x35 alpha Zahlungsempfänger bzw. Bei Zahlungsauftrag: Zahlungsempfänger Bei P P Angabe eines Scheckempfängers nicht P Angabe eines Scheck empfängers nicht möglich
|
122
119
|
# Scheckempfänger Scheckziehung: Scheckempfänger Zeile 1 und 2: möglich
|
123
120
|
# Name Zeile 3 : Straße Zeile 4 : Ort/Land.
|
124
121
|
# Entfällt bei der kurzen Variante NUR FUER DIE BEARBEITUNG DER MELDUNGEN--------------------------------------------------------------------------------------------------------
|
@@ -207,7 +204,7 @@ module KingDta
|
|
207
204
|
data2 += '%08i' % 0 # KANN/PFLICHT 6 BLZ
|
208
205
|
data2 += '%03s' % '' # KANN/PFLICHT 7a ISO-Währungscode
|
209
206
|
data2 += '%010i' % 0 # KANN/PFLICHT 7b BLZ
|
210
|
-
data2 += '%-011s' % booking.account.bank_bic
|
207
|
+
data2 += '%-011s' % booking.account.bank_bic
|
211
208
|
data2 += '%-03s' % booking.account.bank_country_code # Pflichtfelder wenn T8 leer
|
212
209
|
data2 += '%-070s' % booking.account.bank_name
|
213
210
|
data2 += '%-035.35s' % booking.account.bank_street
|
@@ -219,7 +216,7 @@ module KingDta
|
|
219
216
|
data2 += '%-035.35s' % booking.account.owner_zip_city
|
220
217
|
data2 += '%070s' % '' # KANN/PFLICHT 11 Ordervermerk
|
221
218
|
data2 += '/%-034s' % booking.account.bank_iban # PFLICHT 12 35 IBAN bzw. Kontonummer des
|
222
|
-
data2 +=
|
219
|
+
data2 += booking.currency # KANN/PFLICHT 13 3 Auftragswährung (z.B. "EUR")
|
223
220
|
data2 += '%014i' % booking.value.divmod(100)[0] # PFLICHT 14a 14 Betrag (Vorkommastellen) Rechtsbündig
|
224
221
|
data2 += '%02i0' % booking.value.divmod(100)[1] # PFLICHT 14b 3 Betrag (Nachkommastellen) Linksbündig
|
225
222
|
data2 += '%-0140s' % (booking.text || default_text)
|
@@ -228,7 +225,7 @@ module KingDta
|
|
228
225
|
data2 += "%02i" % 0 # N 18 Weisungsschlüssel 3 (gem. Anhang 2)
|
229
226
|
data2 += "%02i" % 0 # N 19 Weisungsschlüssel 4 (gem. Anhang 2 und 2a)
|
230
227
|
data2 += '%025s' % '' # N 20 Zusatzinformationen zum Weisungsschlüssel
|
231
|
-
data2 += "%02i" % 0
|
228
|
+
data2 += "%02i" % (booking.charge_bearer_code || 0) # PFLICHT 21 Entgeltregelung
|
232
229
|
data2 += "%02i" % 13 # PFLICHT 22 Kennzeichnung der Zahlungsart Gemäß Anhang 1; Zahlungen, die weder '11' noch '13' als Zahlungsartschlüssel enthalten
|
233
230
|
data2 += '%027s' % '' # KANN 23 Variabler Text nur für Auftraggeberabrechnung
|
234
231
|
# i dont know what to do.
|
@@ -429,4 +426,4 @@ module KingDta
|
|
429
426
|
# data += '%075s' # 11 Reserve
|
430
427
|
end
|
431
428
|
end
|
432
|
-
end
|
429
|
+
end
|
data/spec/account_spec.rb
CHANGED
@@ -8,45 +8,79 @@ describe KingDta::Account do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should initialize a new account" do
|
11
|
-
lambda{
|
11
|
+
lambda{
|
12
12
|
KingDta::Account.new(:bank_account_number => @ba.bank_account_number,
|
13
13
|
:bank_number => @ba.bank_number,
|
14
14
|
:owner_name => @ba.owner_name)
|
15
15
|
}.should_not raise_error
|
16
16
|
end
|
17
17
|
|
18
|
+
# KingDta::Acount.new tends to remove keys from supplied hashes, which breaks
|
19
|
+
# things when I create multiple DTAUS files at once.
|
20
|
+
it "should not remove data from hashes" do
|
21
|
+
sender = {:owner_street => "123 Random Street",
|
22
|
+
:bank_account_number => @ba.bank_account_number,
|
23
|
+
:bank_number => @ba.bank_number,
|
24
|
+
:owner_name => @ba.owner_name}
|
25
|
+
|
26
|
+
sender.keys.should include(:owner_street) # => true
|
27
|
+
KingDta::Account.new(sender)
|
28
|
+
sender.keys.should include(:owner_street) # => boom!
|
29
|
+
end
|
30
|
+
|
18
31
|
it "should initialize a new dtazv account" do
|
19
|
-
lambda{
|
32
|
+
lambda{
|
20
33
|
KingDta::Account.new(sender_opts)
|
21
34
|
}.should_not raise_error
|
22
35
|
end
|
23
36
|
|
37
|
+
it "should convert bank_account_number to integer" do
|
38
|
+
opts = {:bank_account_number => '0123456',
|
39
|
+
:bank_number => @ba.bank_number,
|
40
|
+
:owner_name => @ba.owner_name}
|
41
|
+
anct = KingDta::Account.new(opts)
|
42
|
+
anct.bank_account_number.should == 123456
|
43
|
+
|
44
|
+
anct2 = KingDta::Account.new(opts.merge(:bank_account_number=>'012 345 6'))
|
45
|
+
anct2.bank_account_number.should == 123456
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should convert bank_number to integer" do
|
49
|
+
opts = {:bank_account_number => @ba.bank_account_number,
|
50
|
+
:bank_number => '0123',
|
51
|
+
:owner_name => @ba.owner_name}
|
52
|
+
anct = KingDta::Account.new(opts)
|
53
|
+
anct.bank_number.should == 123
|
54
|
+
|
55
|
+
anct2 = KingDta::Account.new(opts.merge(:bank_number=>'012 34 5'))
|
56
|
+
anct2.bank_number.should == 12345
|
57
|
+
end
|
58
|
+
|
24
59
|
it "should fail if bank account number is invalid" do
|
25
|
-
|
26
|
-
lambda{
|
60
|
+
lambda{
|
27
61
|
KingDta::Account.new(:bank_account_number => 123456789011123456789011123456789011,
|
28
62
|
:bank_number => @ba.bank_number,
|
29
63
|
:owner_name => @ba.owner_name)
|
30
64
|
|
31
|
-
}.should raise_error(ArgumentError, 'Bank account number too long, max
|
65
|
+
}.should raise_error(ArgumentError, 'Bank account number too long, max 10 allowed')
|
32
66
|
end
|
33
67
|
|
34
68
|
it "should fail if bank number is invalid" do
|
35
|
-
lambda{
|
69
|
+
lambda{
|
36
70
|
KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
|
37
71
|
:bank_number => 0,
|
38
72
|
:owner_name => @ba.owner_name)
|
39
73
|
}.should raise_error(ArgumentError)
|
40
74
|
|
41
|
-
lambda{
|
75
|
+
lambda{
|
42
76
|
KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
|
43
77
|
:bank_number => 123456789101112,
|
44
78
|
:owner_name => @ba.owner_name)
|
45
|
-
}.should raise_error(ArgumentError, 'Bank number too long, max
|
79
|
+
}.should raise_error(ArgumentError, 'Bank number too long, max 8 allowed')
|
46
80
|
end
|
47
81
|
|
48
82
|
it "should fail if owner number is too long" do
|
49
|
-
lambda{
|
83
|
+
lambda{
|
50
84
|
KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
|
51
85
|
:bank_number => @ba.bank_number,
|
52
86
|
:owner_name => @ba.owner_name,
|
@@ -54,7 +88,7 @@ describe KingDta::Account do
|
|
54
88
|
}.should raise_error(ArgumentError, 'Owner number too long, max 10 allowed')
|
55
89
|
end
|
56
90
|
|
57
|
-
it "should fail if street and/or Zip Code is too long" do
|
91
|
+
it "should fail if street and/or Zip Code is too long" do
|
58
92
|
opts = sender_opts.merge( :bank_street => "Lorem ipsum dolor sit amet, consectetur")
|
59
93
|
lambda{
|
60
94
|
KingDta::Account.new(opts)
|
@@ -63,7 +97,7 @@ describe KingDta::Account do
|
|
63
97
|
|
64
98
|
it "should fail if city is too long" do
|
65
99
|
opts = sender_opts.merge( :bank_city => "Lorem ipsum dolor sit amet, consecte")
|
66
|
-
lambda{
|
100
|
+
lambda{
|
67
101
|
KingDta::Account.new opts
|
68
102
|
}.should raise_error(ArgumentError, 'Bank city too long, max 35 allowed')
|
69
103
|
end
|
@@ -105,4 +139,4 @@ describe KingDta::Account do
|
|
105
139
|
acnt = KingDta::Account.new( opts )
|
106
140
|
acnt.owner_country_code.should == "PL"
|
107
141
|
end
|
108
|
-
end
|
142
|
+
end
|
data/spec/dtaus_spec.rb
CHANGED
@@ -90,6 +90,20 @@ describe KingDta::Dtaus do
|
|
90
90
|
str.should == out
|
91
91
|
end
|
92
92
|
|
93
|
+
it "should create c-sektion with long account owner name in extension" do
|
94
|
+
@dtaus.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number,
|
95
|
+
:owner_name => 'A very long name exeeding 27 characters even longer 54 chars', :bank_name => @kto1.bank_name)
|
96
|
+
|
97
|
+
@dtaus.add(@booking)
|
98
|
+
@dtaus.bookings.first.text = 'SalesKing Monatsbeitrag 08/10 Freelancer Version'
|
99
|
+
@dtaus.add_c(@booking)
|
100
|
+
str = @dtaus.dta_string
|
101
|
+
str.length.should == 256
|
102
|
+
str.should include(@kto2.owner_name.upcase)
|
103
|
+
out = "0245C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH A VERY LONG NAME EXEEDING 2SALESKING MONATSBEITRAG 08/1 020210 FREELANCER VERSION 037 CHARACTERS EVEN LONGER 54 "
|
104
|
+
str.should == out
|
105
|
+
end
|
106
|
+
|
93
107
|
it "should create c-sektion with default booking text" do
|
94
108
|
@dtaus.default_text = 'Default verwendungszweck'
|
95
109
|
@dtaus.add_c(@booking)
|
@@ -114,6 +128,15 @@ describe KingDta::Dtaus do
|
|
114
128
|
str.should == out
|
115
129
|
end
|
116
130
|
|
131
|
+
it "should create whole dta string with long texts exeeding extension" do
|
132
|
+
@dtaus.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number,
|
133
|
+
:owner_name => 'A very long name exeeding 27 characters even longer 54 chars', :bank_name => @kto1.bank_name)
|
134
|
+
@dtaus.add(@booking)
|
135
|
+
@dtaus.bookings.first.text = 'Rgn R-3456-0102220 Monatsbeitrag 08/10 Freelancer Version Vielen Dank Ihre SalesKing GmbH' * 20
|
136
|
+
@dtaus.bookings.first.account.owner_name = 'A very long name exeeding 27 characters even longer 54 chars'
|
137
|
+
str = @dtaus.create ## should not raise error
|
138
|
+
end
|
139
|
+
|
117
140
|
it "should create whole dta string with long booking text in extension" do
|
118
141
|
@dtaus.add(@booking)
|
119
142
|
@dtaus.bookings.first.text = 'Rgn R-3456-0102220 Monatsbeitrag 08/10 Freelancer Version Vielen Dank Ihre SalesKing GmbH'
|
data/spec/dtazv_spec.rb
CHANGED
@@ -4,6 +4,19 @@ require 'spec_helper'
|
|
4
4
|
# All Test DTAZV output strings are validated with sFirm => lokal Sparkassen Software
|
5
5
|
|
6
6
|
describe KingDta::Dtazv do
|
7
|
+
context "support for non-EUR currency" do
|
8
|
+
before do
|
9
|
+
@dtazv = KingDta::Dtazv.new(Date.parse('2011-08-28'))
|
10
|
+
@dtazv.account = KingDta::Account.new sender_opts
|
11
|
+
@booking = KingDta::Booking.new(KingDta::Account.new(swiss_receiver), 235.42, nil, nil, "CHF")
|
12
|
+
end
|
13
|
+
|
14
|
+
# FIXME: Write better tests later
|
15
|
+
it "should at least not raise an error" do
|
16
|
+
@dtazv.add(@booking)
|
17
|
+
@dtazv.create
|
18
|
+
end
|
19
|
+
end
|
7
20
|
|
8
21
|
before :each do
|
9
22
|
@dtazv = KingDta::Dtazv.new(Date.parse('2011-08-28'))
|
data/spec/spec_helper.rb
CHANGED
@@ -4,10 +4,10 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
4
4
|
|
5
5
|
require 'simplecov'
|
6
6
|
SimpleCov.start 'rails'
|
7
|
-
SimpleCov.coverage_dir 'coverage
|
7
|
+
SimpleCov.coverage_dir 'coverage'
|
8
8
|
|
9
9
|
require 'rubygems'
|
10
|
-
require
|
10
|
+
require 'king_dtaus'
|
11
11
|
require 'rspec'
|
12
12
|
require 'ostruct'
|
13
13
|
require 'date'
|
@@ -21,16 +21,16 @@ def sender_opts
|
|
21
21
|
:bank_account_number => '1326049634',
|
22
22
|
:bank_number => '37050299',
|
23
23
|
:bank_name => 'Kreissparkasse Köln',
|
24
|
-
:bank_street =>
|
25
|
-
:bank_city =>
|
26
|
-
:bank_zip =>
|
27
|
-
:bank_country_code =>
|
28
|
-
:owner_number =>
|
24
|
+
:bank_street => 'Bank Eine Straße 2',
|
25
|
+
:bank_city => 'Bank Köln',
|
26
|
+
:bank_zip => '51063',
|
27
|
+
:bank_country_code => 'DE',
|
28
|
+
:owner_number => '',
|
29
29
|
:owner_name =>'Jan Kus',
|
30
|
-
:owner_street =>
|
31
|
-
:owner_city =>
|
32
|
-
:owner_zip_code =>
|
33
|
-
:owner_country_code =>
|
30
|
+
:owner_street => 'Meine Eine Straße 2',
|
31
|
+
:owner_city => 'Meine Köln',
|
32
|
+
:owner_zip_code => '51063',
|
33
|
+
:owner_country_code => 'DE'
|
34
34
|
}
|
35
35
|
end
|
36
36
|
|
@@ -39,10 +39,10 @@ def receiver_opts
|
|
39
39
|
:bank_iban => 'PL10105013151000002308622378',
|
40
40
|
:bank_bic => 'COBADEFF366',
|
41
41
|
:owner_name =>'Dalai Lama',
|
42
|
-
:owner_street =>
|
43
|
-
:owner_city =>
|
44
|
-
:owner_zip_code =>
|
45
|
-
:owner_country_code =>
|
42
|
+
:owner_street => 'Bush-Avenue 55',
|
43
|
+
:owner_city => 'India',
|
44
|
+
:owner_zip_code => '445555',
|
45
|
+
:owner_country_code => 'DE' # actually wrong since iban is in poland
|
46
46
|
# only needed if no bic present
|
47
47
|
# :bank_name => 'Dalai Lamas Bank',
|
48
48
|
# :bank_street => "5th avenue",
|
@@ -53,6 +53,19 @@ def receiver_opts
|
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
|
+
def swiss_receiver
|
57
|
+
# Random data
|
58
|
+
{
|
59
|
+
:bank_iban => "CH6331142389293969079",
|
60
|
+
:bank_bic => "BPPBCHGGXXX",
|
61
|
+
:owner_name => "Muammar al-Gaddafi",
|
62
|
+
:owner_street => "Bitziusstrasse 40",
|
63
|
+
:owner_city => "Bern",
|
64
|
+
:owner_zip_code => "3000",
|
65
|
+
:owner_country_code => "CH"
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
56
69
|
def test_kto1
|
57
70
|
opts = {
|
58
71
|
:bank_account_number => '7828970037',
|
metadata
CHANGED
@@ -1,128 +1,134 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: king_dtaus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
- pre
|
11
|
-
version: 2.0.4.pre
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.4
|
5
|
+
prerelease:
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Georg Leciejewski
|
15
9
|
- Georg Ledermann
|
16
10
|
- Jan Kus
|
17
11
|
autorequire:
|
18
12
|
bindir: bin
|
19
13
|
cert_chain: []
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
type: :runtime
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
14
|
+
date: 2011-11-15 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: i18n
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
27
19
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
|
33
|
-
- 0
|
34
|
-
version: "0"
|
35
|
-
name: king_dtaus
|
36
|
-
version_requirements: *id001
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
24
|
+
type: :runtime
|
37
25
|
prerelease: false
|
38
|
-
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '0'
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: rdoc
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
39
40
|
type: :development
|
40
|
-
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
43
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
- 0
|
48
|
-
version: "0"
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
|
-
|
51
|
-
prerelease: false
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
type: :development
|
54
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
55
51
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
version: "0"
|
63
|
-
name: jeweler
|
64
|
-
version_requirements: *id003
|
65
|
-
prerelease: false
|
66
|
-
- !ruby/object:Gem::Dependency
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
67
56
|
type: :development
|
68
|
-
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
59
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
- 0
|
76
|
-
version: "0"
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
77
65
|
name: simplecov
|
78
|
-
|
79
|
-
|
80
|
-
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
81
72
|
type: :development
|
82
|
-
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
75
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
88
|
-
|
89
|
-
- 0
|
90
|
-
version: "0"
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
- !ruby/object:Gem::Dependency
|
91
81
|
name: mocha
|
92
|
-
|
93
|
-
|
94
|
-
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
95
88
|
type: :development
|
96
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
91
|
none: false
|
98
|
-
requirements:
|
99
|
-
- -
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rake
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.9.2
|
104
|
+
type: :development
|
107
105
|
prerelease: false
|
108
|
-
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.9.2
|
112
|
+
description: ! 'DTA/DTAUS and DTAZV are text-based formats to create bank transfers
|
113
|
+
for german banks.
|
114
|
+
|
115
|
+
This gem creates DTA/DATAUS files for inner german credit and debit(Gutschrift/Lastschrift)
|
116
|
+
transfers.
|
117
|
+
|
118
|
+
It is also capable of creating DTAZV credit-files for transfers from Germany to
|
119
|
+
European SEPA region.'
|
109
120
|
email: gl@salesking.eu
|
110
121
|
executables: []
|
111
|
-
|
112
122
|
extensions: []
|
113
|
-
|
114
|
-
extra_rdoc_files:
|
123
|
+
extra_rdoc_files:
|
115
124
|
- README.markdown
|
116
|
-
files:
|
125
|
+
files:
|
126
|
+
- .gitignore
|
117
127
|
- .travis.yml
|
118
128
|
- Gemfile
|
119
129
|
- MIT-LICENSE
|
120
130
|
- README.markdown
|
121
131
|
- Rakefile
|
122
|
-
- VERSION
|
123
|
-
- docs/dtazv.pdf
|
124
|
-
- docs/dtazv_bank_bbk.pdf
|
125
|
-
- docs/example.output
|
126
132
|
- king_dtaus.gemspec
|
127
133
|
- lib/king_dta/account.rb
|
128
134
|
- lib/king_dta/booking.rb
|
@@ -131,6 +137,7 @@ files:
|
|
131
137
|
- lib/king_dta/dtazv.rb
|
132
138
|
- lib/king_dta/exception.rb
|
133
139
|
- lib/king_dta/helper.rb
|
140
|
+
- lib/king_dta/version.rb
|
134
141
|
- lib/king_dtaus.rb
|
135
142
|
- spec/account_spec.rb
|
136
143
|
- spec/booking_spec.rb
|
@@ -138,41 +145,31 @@ files:
|
|
138
145
|
- spec/dtazv_spec.rb
|
139
146
|
- spec/helper_spec.rb
|
140
147
|
- spec/spec_helper.rb
|
141
|
-
has_rdoc: true
|
142
148
|
homepage: http://github.com/salesking/king_dtaus
|
143
149
|
licenses: []
|
144
|
-
|
145
150
|
post_install_message:
|
146
151
|
rdoc_options: []
|
147
|
-
|
148
|
-
require_paths:
|
152
|
+
require_paths:
|
149
153
|
- lib
|
150
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
155
|
none: false
|
152
|
-
requirements:
|
153
|
-
- -
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
|
156
|
-
segments:
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
segments:
|
157
161
|
- 0
|
158
|
-
|
159
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
hash: 2948502894254657810
|
163
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
164
|
none: false
|
161
|
-
requirements:
|
162
|
-
- -
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
|
165
|
-
segments:
|
166
|
-
- 1
|
167
|
-
- 3
|
168
|
-
- 1
|
169
|
-
version: 1.3.1
|
165
|
+
requirements:
|
166
|
+
- - ! '>='
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
170
169
|
requirements: []
|
171
|
-
|
172
170
|
rubyforge_project:
|
173
|
-
rubygems_version: 1.
|
171
|
+
rubygems_version: 1.8.24
|
174
172
|
signing_key:
|
175
173
|
specification_version: 3
|
176
|
-
summary: Generate DTAUS
|
174
|
+
summary: Generate DTA/DTAUS and DTAZV bank transfer files .. the easy way
|
177
175
|
test_files: []
|
178
|
-
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.4.pre
|
data/docs/dtazv.pdf
DELETED
Binary file
|
data/docs/dtazv_bank_bbk.pdf
DELETED
Binary file
|
data/docs/example.output
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
0256P37040044 Commerzbank Köln 5th avenue 55323 los angeles1106080100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
2
|
-
|
3
|
-
0256Q370400447828970037 GIMME YOUR MONEY AG 6th avenue 445555 los angeles11060801110608N000000000000000000000000000000000000000000000000000000000000000000000000000000
|
4
|
-
|
5
|
-
0572T37040044EUR782897003711060837040044EUR0037040044 MARKF1100 FIDEL CASTRO 0 GR1601101250000000012300695EUR00000000000220025 0 0 0 0 00013 0 00000000000000000000000000000000000000000000000000000 00
|
6
|
-
|
7
|
-
256Y000000000000000000000000000000000000000000000000000000000000000000000001 0
|