datev 0.8.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push.yml +31 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/datev.gemspec +2 -2
- data/examples/EXTF_Buchungsstapel.csv +1 -1
- data/examples/EXTF_Kontenbeschriftungen.csv +1 -1
- data/examples/EXTF_Stammdaten.csv +1 -1
- data/lib/datev/base.rb +10 -1
- data/lib/datev/base/booking.rb +3 -3
- data/lib/datev/base/header/account_header.rb +12 -10
- data/lib/datev/base/header/booking_header.rb +14 -12
- data/lib/datev/base/header/contact_header.rb +11 -9
- data/lib/datev/field/string_field.rb +5 -0
- data/lib/datev/version.rb +1 -1
- metadata +9 -9
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44e54494d2b4d0033a79489db24b455ac0e03b0a9c39a0f0743788c09477a403
|
4
|
+
data.tar.gz: ee680fa565c6fb9c4ae62f9eca7dbbd9ec9474dba69e7d7aa0c56faa3f9cf297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c25a302966f4d6aa2694d0040baadb2d154fd7f24c44b763e93d765bb2935847f14066931d7f26e6cc055fa578aa38c69b9ec9deb3cdba1a1b123e4cfd5646ed
|
7
|
+
data.tar.gz: 9ca24a4beb6bbc82ba0e87465c579d4e1d9aa9d76858957f96446021e0c4f5569040c2ebea52194801933ac88932a3a151164a273b0be3e8ee19b91abc0f8bfb
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
fail-fast: false
|
9
|
+
matrix:
|
10
|
+
ruby: [2.5, 2.6, 2.7, 3.0]
|
11
|
+
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
name: Test against Ruby ${{ matrix.ruby }}
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
|
23
|
+
- name: Install gems
|
24
|
+
run: |
|
25
|
+
gem install bundler
|
26
|
+
bundle install --jobs 4 --retry 3
|
27
|
+
|
28
|
+
- name: Run tests
|
29
|
+
env:
|
30
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
31
|
+
run: bundle exec rspec
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -35,7 +35,7 @@ This code of conduct applies both within project spaces and in public spaces
|
|
35
35
|
when an individual is representing the project or its community.
|
36
36
|
|
37
37
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at
|
38
|
+
reported by contacting a project maintainer at georg@ledermann.dev. All
|
39
39
|
complaints will be reviewed and investigated and will result in a response that
|
40
40
|
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
41
|
obligated to maintain confidentiality with regard to the reporter of an
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2016-
|
3
|
+
Copyright (c) 2016-2021 Georg Ledermann
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Ruby gem to export bookings and more to DATEV format as CSV file
|
4
4
|
|
5
|
-
Supported DATEV
|
5
|
+
Supported DATEV format: v7.0
|
6
6
|
|
7
|
-
[![Build Status](https://
|
7
|
+
[![Build Status](https://github.com/ledermann/datev/workflows/CI/badge.svg)](https://github.com/ledermann/datev/actions)
|
8
8
|
[![Code Climate](https://codeclimate.com/github/ledermann/datev/badges/gpa.svg)](https://codeclimate.com/github/ledermann/datev)
|
9
9
|
[![Coverage Status](https://coveralls.io/repos/github/ledermann/datev/badge.svg?branch=master)](https://coveralls.io/github/ledermann/datev?branch=master)
|
10
10
|
|
data/datev.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "datev"
|
8
8
|
spec.version = Datev::VERSION
|
9
9
|
spec.authors = ["Georg Ledermann"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["georg@ledermann.dev"]
|
11
11
|
|
12
12
|
spec.summary = %q{Export booking data in DATEV format}
|
13
13
|
spec.description = %q{Provides an easy way to create CSV files which can be imported into accounting applications}
|
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency "rspec"
|
26
26
|
spec.add_development_dependency 'simplecov'
|
27
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'coveralls_reborn'
|
28
28
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"EXTF";
|
1
|
+
"EXTF";700;21;"Buchungsstapel";9;20180306102500000;;"XY";"Chief Accounting Officer";"";1001;456;20180101;4;20180201;20180228;"Beispiel-Buchungen";"";1;;0;"EUR";"";"";"";"";"";;;"";""
|
2
2
|
Umsatz (ohne Soll/Haben-Kz);Soll/Haben-Kennzeichen;WKZ Umsatz;Kurs;Basisumsatz;WKZ Basisumsatz;Konto;Gegenkonto (ohne BU-Schl�ssel);BU-Schl�ssel;Belegdatum;Belegfeld 1;Belegfeld 2;Skonto;Buchungstext;Postensperre;Diverse Adressnummer;Gesch�ftspartnerbank;Sachverhalt;Zinssperre;Beleglink;Beleginfo � Art 1;Beleginfo � Inhalt 1;Beleginfo � Art 2;Beleginfo � Inhalt 2;Beleginfo � Art 3;Beleginfo � Inhalt 3;Beleginfo � Art 4;Beleginfo � Inhalt 4;Beleginfo � Art 5;Beleginfo � Inhalt 5;Beleginfo � Art 6;Beleginfo � Inhalt 6;Beleginfo � Art 7;Beleginfo � Inhalt 7;Beleginfo � Art 8;Beleginfo � Inhalt 8;KOST1 � Kostenstelle;KOST2 � Kostenstelle;Kost Menge;EU-Land u. USt-IdNr.;EU-Steuersatz;Abw. Versteuerungsart;Sachverhalt L+L;Funktionserg�nzung L+L;BU 49 Hauptfunktionstyp;BU 49 Hauptfunktionsnummer;BU 49 Funktionserg�nzung;Zusatzinformation � Art 1;Zusatzinformation � Inhalt 1;Zusatzinformation � Art 2;Zusatzinformation � Inhalt 2;Zusatzinformation � Art 3;Zusatzinformation � Inhalt 3;Zusatzinformation � Art 4;Zusatzinformation � Inhalt 4;Zusatzinformation � Art 5;Zusatzinformation � Inhalt 5;Zusatzinformation � Art 6;Zusatzinformation � Inhalt 6;Zusatzinformation � Art 7;Zusatzinformation � Inhalt 7;Zusatzinformation � Art 8;Zusatzinformation � Inhalt 8;Zusatzinformation � Art 9;Zusatzinformation � Inhalt 9;Zusatzinformation � Art 10;Zusatzinformation � Inhalt 10;Zusatzinformation � Art 11;Zusatzinformation � Inhalt 11;Zusatzinformation � Art 12;Zusatzinformation � Inhalt 12;Zusatzinformation � Art 13;Zusatzinformation � Inhalt 13;Zusatzinformation � Art 14;Zusatzinformation � Inhalt 14;Zusatzinformation � Art 15;Zusatzinformation � Inhalt 15;Zusatzinformation � Art 16;Zusatzinformation � Inhalt 16;Zusatzinformation � Art 17;Zusatzinformation � Inhalt 17;Zusatzinformation � Art 18;Zusatzinformation � Inhalt 18;Zusatzinformation � Art 19;Zusatzinformation � Inhalt 19;Zusatzinformation � Art 20;Zusatzinformation � Inhalt 20;St�ck;Gewicht;Zahlweise;Forderungsart;Veranlagungsjahr;Zugeordnete F�lligkeit;Skontotyp;Auftragsnummer;Buchungstyp;USt-Schl�ssel (Anzahlungen);EU-Mitgliedstaat (Anzahlungen);Sachverhalt L+L (Anzahlungen);EU-Steuersatz (Anzahlungen);Erl�skonto (Anzahlungen);Herkunft-Kz;Leerfeld;KOST-Datum;SEPA-Mandatsreferenz;Skontosperre;Gesellschaftername;Beteiligtennummer;Identifikationsnummer;Zeichnernummer;Postensperre bis;Bezeichnung;Kennzeichen;Festschreibung;Leistungsdatum;Datum Zuord.;F�lligkeit;Generalumkehr;Steuersatz;Land
|
3
3
|
24,95;"H";"";;;"";1200;4940;"8";2102;"";"";;"Fachbuch: Controlling f�r Dummies";;"";;;;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;"";;"";;;;;;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;;"";;;;"";"";;"";;;;"";"";;"";;"";;"";"";;"";;;;;;"";;""
|
4
4
|
5950,00;"S";"";;;"";10000;8400;"";2202;"RE201802-135";"";;"Honorar FiBu-Seminar";;"";;;;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;"";;"";;;;;;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;;"";;;;"";"";;"";;;;"";"";;"";;"";;"";"";;"";;;;;;"";;""
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"EXTF";
|
1
|
+
"EXTF";700;20;"Kontenbeschriftungen";2;20180223152500000;;"XY";"Chief Accounting Officer";"";1001;456;20180101;4;;;"Beispiel-Konten";"";;;;"";"";"";"";"";"";;;"";""
|
2
2
|
Konto;Kontenbeschriftung;Sprach-ID
|
3
3
|
400;"Betriebsausstattung";"de-DE"
|
4
4
|
1000;"Kasse";"de-DE"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"EXTF";
|
1
|
+
"EXTF";700;16;"Debitoren/Kreditoren";5;20180306102500000;;"XY";"Chief Accounting Officer";"";1001;456;20180101;4;;;"Kunden und Lieferanten";"";;;;"";"";"";"";"";"";;;"";""
|
2
2
|
Konto;Name (Adressatentyp Unternehmen);Unternehmensgegenstand;Name (Adressatentyp nat�rl. Person);Vorname (Adressatentyp nat�rl. Person);Name (Adressatentyp keine Angabe);Adressatentyp;Kurzbezeichnung;EU-Land;EU-USt-IdNr.;Anrede;Titel/Akad. Grad;Adelstitel;Namensvorsatz;Adressart;Stra�e;Postfach;Postleitzahl;Ort;Land;Versandzusatz;Adresszusatz;Abweichende Anrede;Abw. Zustellbezeichnung 1;Abw. Zustellbezeichnung 2;Kennz. Korrespondenzadresse;Adresse G�ltig von;Adresse G�ltig bis;Telefon;Bemerkung (Telefon);Telefon Gesch�ftsleitung;Bemerkung (Telefon GL);E-Mail;Bemerkung (E-Mail);Internet;Bemerkung (Internet);Fax;Bemerkung (Fax);Sonstige;Bemerkung (Sonstige);Bankleitzahl 1;Bankbezeichnung 1;Bankkonto-Nummer 1;L�nderkennzeichen 1;IBAN 1;Leerfeld 1;SWIFT-Code 1;Abw. Kontoinhaber 1;Kennz. Haupt-Bankverb. 1;Bankverb. 1 G�ltig von;Bankverb. 1 G�ltig bis;Bankleitzahl 2;Bankbezeichnung 2;Bankkonto-Nummer 2;L�nderkennzeichen 2;IBAN 2;Leerfeld 2;SWIFT-Code 2;Abw. Kontoinhaber 2;Kennz. Haupt-Bankverb. 2;Bankverb. 2 G�ltig von;Bankverb. 2 G�ltig bis;Bankleitzahl 3;Bankbezeichnung 3;Bankkonto-Nummer 3;L�nderkennzeichen 3;IBAN 3;Leerfeld 3;SWIFT-Code 3;Abw. Kontoinhaber 3;Kennz. Haupt-Bankverb. 3;Bankverb. 3 G�ltig von;Bankverb. 3 G�ltig bis;Bankleitzahl 4;Bankbezeichnung 4;Bankkonto-Nummer 4;L�nderkennzeichen 4;IBAN 4;Leerfeld 4;SWIFT-Code 4;Abw. Kontoinhaber 4;Kennz. Haupt-Bankverb. 4;Bankverb. 4 G�ltig von;Bankverb. 4 G�ltig bis;Bankleitzahl 5;Bankbezeichnung 5;Bankkonto-Nummer 5;L�nderkennzeichen 5;IBAN 5;Leerfeld 5;SWIFT-Code 5;Abw. Kontoinhaber 5;Kennz. Haupt-Bankverb. 5;Bankverb. 5 G�ltig von;Bankverb. 5 G�ltig bis;Leerfeld 11;Briefanrede;Gru�formel;Kundennummer;Steuernummer;Sprache;Ansprechpartner;Vertreter;Sachbearbeiter;Diverse-Konto;Ausgabeziel;W�hrungssteuerung;Kreditlimit (Debitor);Zahlungsbedingung;F�lligkeit in Tagen (Debitor);Skonto in Prozent (Debitor);Kreditoren-Ziel 1 (Tage);Kreditoren-Skonto 1 (%);Kreditoren-Ziel 2 (Tage);Kreditoren-Skonto 2 (%);Kreditoren-Ziel 3 Brutto (Tage);Kreditoren-Ziel 4 (Tage);Kreditoren-Skonto 4 (%);Kreditoren-Ziel 5 (Tage);Kreditoren-Skonto 5 (%);Mahnung;Kontoauszug;Mahntext;Mahntext 2;Mahntext 3;Kontoauszugstext;Mahnlimit Betrag;Mahnlimit %;Zinsberechnung;Mahnzinssatz 1;Mahnzinssatz 2;Mahnzinssatz 3;Lastschrift;Verfahren;Mandantenbank;Zahlungstr�ger;Indiv. Feld 1;Indiv. Feld 2;Indiv. Feld 3;Indiv. Feld 4;Indiv. Feld 5;Indiv. Feld 6;Indiv. Feld 7;Indiv. Feld 8;Indiv. Feld 9;Indiv. Feld 10;Indiv. Feld 11;Indiv. Feld 12;Indiv. Feld 13;Indiv. Feld 14;Indiv. Feld 15;Abweichende Anrede (Rechnungsadresse);Adressart (Rechnungsadresse);Stra�e (Rechnungsadresse);Postfach (Rechnungsadresse);Postleitzahl (Rechnungsadresse);Ort (Rechnungsadresse);Land (Rechnungsadresse);Versandzusatz (Rechnungsadresse);Adresszusatz (Rechnungsadresse);Abw. Zustellbezeichnung 1 (Rechnungsadresse);Abw. Zustellbezeichnung 2 (Rechnungsadresse);Adresse G�ltig von (Rechnungsadresse);Adresse G�ltig bis (Rechnungsadresse);Bankleitzahl 6;Bankbezeichnung 6;Bankkonto-Nummer 6;L�nderkennzeichen 6;IBAN 6;Leerfeld 6;SWIFT-Code 6;Abw. Kontoinhaber 6;Kennz. Haupt-Bankverb. 6;Bankverb. 6 G�ltig von;Bankverb. 6 G�ltig bis;Bankleitzahl 7;Bankbezeichnung 7;Bankkonto-Nummer 7;L�nderkennzeichen 7;IBAN 7;Leerfeld 7;SWIFT-Code 7;Abw. Kontoinhaber 7;Kennz. Haupt-Bankverb. 7;Bankverb. 7 G�ltig von;Bankverb. 7 G�ltig bis;Bankleitzahl 8;Bankbezeichnung 8;Bankkonto-Nummer 8;L�nderkennzeichen 8;IBAN 8;Leerfeld 8;SWIFT-Code 8;Abw. Kontoinhaber 8;Kennz. Haupt-Bankverb. 8;Bankverb. 8 G�ltig von;Bankverb. 8 G�ltig bis;Bankleitzahl 9;Bankbezeichnung 9;Bankkonto-Nummer 9;L�nderkennzeichen 9;IBAN 9;Leerfeld 9;SWIFT-Code 9;Abw. Kontoinhaber 9;Kennz. Haupt-Bankverb. 9;Bankverb. 9 G�ltig von;Bankverb. 9 G�ltig bis;Bankleitzahl 10;Bankbezeichnung 10;Bankkonto-Nummer 10;L�nderkennzeichen 10;IBAN 10;Leerfeld 10;SWIFT-Code 10;Abw. Kontoinhaber 10;Kennz. Haupt-Bankverb. 10;Bankverb. 10 G�ltig von;Bankverb. 10 G�ltig bis;Nummer Fremdsystem;Insolvent;SEPA-Mandatsreferenz 1;SEPA-Mandatsreferenz 2;SEPA-Mandatsreferenz 3;SEPA-Mandatsreferenz 4;SEPA-Mandatsreferenz 5;SEPA-Mandatsreferenz 6;SEPA-Mandatsreferenz 7;SEPA-Mandatsreferenz 8;SEPA-Mandatsreferenz 9;SEPA-Mandatsreferenz 10;Verkn�pftes OPOS-Konto;Mahnsperre bis;Lastschriftsperre bis;Zahlungssperre bis;Geb�hrenberechnung;Mahngeb�hr 1;Mahngeb�hr 2;Mahngeb�hr 3;Pauschalberechnung;Verzugspauschale 1;Verzugspauschale 2;Verzugspauschale 3;Alternativer Suchname;Status;Anschrift manuell ge�ndert (Korrespondenzadresse);Anschrift individuell (Korrespondenzadresse);Anschrift manuell ge�ndert (Rechnungsadresse);Anschrift individuell (Rechnungsadresse);Fristberechnung bei Debitor;Mahnfrist 1;Mahnfrist 2;Mahnfrist 3;Letzte Frist
|
3
3
|
10000;"";"";"Mustermann";"Sabine";"";"1";"";"";"";"Frau";"Dr.";"";"";"STR";"Am Haagelspf�dchen 14";"";"50999";"K�ln";"DE";"";"";"";"";"";;;;"0221/1234567";"";"";"";"sabine@mustermann.de";"";"www.mustermann.de";"";"0221/1234568";"";"";"";"";"";"";"";"DE12500105170648489890";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;;"Sehr geehrte Frau Dr. Mustermann";"";"";"";1;"";"";"";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"";"";;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";;"";"";"";"";"";"";"";"";"";"";;;;;;;;;;;;;"";;;"";;"";;;;;
|
4
4
|
70001;"Meyer GmbH";"";"";"";"";"2";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;;"";"";"";"";;"";"";"";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"";"";;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";"";"";"";"";"";"";"";;;;"";;"";"";"";"";"";"";"";"";"";"";;;;;;;;;;;;;"";;;"";;"";;;;;
|
data/lib/datev/base.rb
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
module Datev
|
2
2
|
class Base
|
3
3
|
class << self
|
4
|
-
attr_accessor :fields
|
4
|
+
attr_accessor :fields
|
5
|
+
attr_writer :default_attributes
|
6
|
+
|
7
|
+
def default_attributes
|
8
|
+
if @default_attributes.is_a?(Proc)
|
9
|
+
@default_attributes.call
|
10
|
+
else
|
11
|
+
@default_attributes
|
12
|
+
end
|
13
|
+
end
|
5
14
|
|
6
15
|
def inherited(subclass)
|
7
16
|
subclass.fields = self.fields
|
data/lib/datev/base/booking.rb
CHANGED
@@ -59,7 +59,7 @@ module Datev
|
|
59
59
|
end
|
60
60
|
|
61
61
|
# 9
|
62
|
-
field 'BU-Schlüssel', :string, limit:
|
62
|
+
field 'BU-Schlüssel', :string, limit: 4
|
63
63
|
# Steuerschlüssel und/oder Berichtigungsschlüssel
|
64
64
|
|
65
65
|
# 10
|
@@ -67,13 +67,13 @@ module Datev
|
|
67
67
|
# Achtung: Auch bei individueller Feldformatierung mit vierstelliger Jahreszahl wird immer in das aktuelle Wirtschaftsjahr importiert, wenn Tag und Monat des Datums im bebuchbaren Zeitraum liegen, da die Jahreszahl nicht berücksichtigt wird.
|
68
68
|
|
69
69
|
# 11
|
70
|
-
field 'Belegfeld 1', :string, limit:
|
70
|
+
field 'Belegfeld 1', :string, limit: 36, regex: %r{\A[a-zA-Z0-9\$\&\%\*\+\-\/]*\z}
|
71
71
|
# Rechnungs-/Belegnummer
|
72
72
|
# Das Belegfeld 1 ist der "Schlüssel" für die Verwaltung von Offenen Posten.
|
73
73
|
# Bei einer Zahlung oder Gutschrift erfolgt nur dann ein OP-Ausgleich, wenn die Belegnummer mit dem Belegfeld 1 identisch ist.
|
74
74
|
|
75
75
|
# 12
|
76
|
-
field 'Belegfeld 2', :string, limit: 12
|
76
|
+
field 'Belegfeld 2', :string, limit: 12, regex: %r{\A[a-zA-Z0-9\$\&\%\*\+\-\/]*\z}
|
77
77
|
# Belegnummer oder OPOS-Verarbeitungsinformationen
|
78
78
|
|
79
79
|
# 13
|
@@ -1,14 +1,16 @@
|
|
1
1
|
module Datev
|
2
2
|
class AccountHeader < Header
|
3
|
-
self.default_attributes =
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
self.default_attributes = proc do
|
4
|
+
{
|
5
|
+
'DATEV-Format-KZ' => 'EXTF',
|
6
|
+
'Versionsnummer' => 700,
|
7
|
+
'Datenkategorie' => 20,
|
8
|
+
'Formatname' => 'Kontenbeschriftungen',
|
9
|
+
'Formatversion' => 2,
|
10
|
+
'Erzeugt am' => Time.now.utc,
|
11
|
+
'Sachkontenlänge' => 4,
|
12
|
+
'Bezeichnung' => 'Kontenbeschriftungen'
|
13
|
+
}
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,16 +1,18 @@
|
|
1
1
|
module Datev
|
2
2
|
class BookingHeader < Header
|
3
|
-
self.default_attributes =
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
self.default_attributes = proc do
|
4
|
+
{
|
5
|
+
'DATEV-Format-KZ' => 'EXTF',
|
6
|
+
'Versionsnummer' => 700,
|
7
|
+
'Datenkategorie' => 21,
|
8
|
+
'Formatname' => 'Buchungsstapel',
|
9
|
+
'Formatversion' => 9,
|
10
|
+
'Erzeugt am' => Time.now.utc,
|
11
|
+
'Sachkontenlänge' => 4,
|
12
|
+
'Bezeichnung' => 'Buchungen',
|
13
|
+
'Buchungstyp' => 1,
|
14
|
+
'WKZ' => 'EUR'
|
15
|
+
}
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
@@ -1,13 +1,15 @@
|
|
1
1
|
module Datev
|
2
2
|
class ContactHeader < Header
|
3
|
-
self.default_attributes =
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
self.default_attributes = proc do
|
4
|
+
{
|
5
|
+
'DATEV-Format-KZ' => 'EXTF',
|
6
|
+
'Versionsnummer' => 700,
|
7
|
+
'Datenkategorie' => 16,
|
8
|
+
'Formatname' => 'Debitoren/Kreditoren',
|
9
|
+
'Formatversion' => 5,
|
10
|
+
'Erzeugt am' => Time.now.utc,
|
11
|
+
'Sachkontenlänge' => 4
|
12
|
+
}
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
@@ -4,12 +4,17 @@ module Datev
|
|
4
4
|
options[:limit]
|
5
5
|
end
|
6
6
|
|
7
|
+
def regex
|
8
|
+
options[:regex]
|
9
|
+
end
|
10
|
+
|
7
11
|
def validate!(value)
|
8
12
|
super
|
9
13
|
|
10
14
|
if value
|
11
15
|
raise ArgumentError.new("Value given for field '#{name}' is not a String") unless value.is_a?(String)
|
12
16
|
raise ArgumentError.new("Value '#{value}' for field '#{name}' is too long") if limit && value.length > limit
|
17
|
+
raise ArgumentError.new("Value '#{value}' for field '#{name}' does not match regex") if regex && value !~ regex
|
13
18
|
end
|
14
19
|
end
|
15
20
|
|
data/lib/datev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: coveralls_reborn
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -83,14 +83,14 @@ dependencies:
|
|
83
83
|
description: Provides an easy way to create CSV files which can be imported into accounting
|
84
84
|
applications
|
85
85
|
email:
|
86
|
-
-
|
86
|
+
- georg@ledermann.dev
|
87
87
|
executables: []
|
88
88
|
extensions: []
|
89
89
|
extra_rdoc_files: []
|
90
90
|
files:
|
91
|
+
- ".github/workflows/push.yml"
|
91
92
|
- ".gitignore"
|
92
93
|
- ".rspec"
|
93
|
-
- ".travis.yml"
|
94
94
|
- CHANGELOG.md
|
95
95
|
- CODE_OF_CONDUCT.md
|
96
96
|
- Gemfile
|
@@ -127,7 +127,7 @@ homepage: https://github.com/ledermann/datev
|
|
127
127
|
licenses:
|
128
128
|
- MIT
|
129
129
|
metadata: {}
|
130
|
-
post_install_message:
|
130
|
+
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
133
133
|
- lib
|
@@ -142,8 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
146
|
-
signing_key:
|
145
|
+
rubygems_version: 3.2.20
|
146
|
+
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Export booking data in DATEV format
|
149
149
|
test_files: []
|