README.md in datev-0.6.0 vs README.md in datev-0.7.0
- old
+ new
@@ -1,9 +1,11 @@
# Datev
-Ruby gem for exporting bookings to DATEV via CSV file
+Ruby gem to export bookings and more to DATEV format as CSV file
+Supported DATEV Version: 5.1
+
[![Build Status](https://travis-ci.org/ledermann/datev.svg?branch=master)](https://travis-ci.org/ledermann/datev)
[![Code Climate](https://codeclimate.com/github/ledermann/datev/badges/gpa.svg)](https://codeclimate.com/github/ledermann/datev)
[![Coverage Status](https://coveralls.io/repos/github/ledermann/datev/badge.svg?branch=master)](https://coveralls.io/github/ledermann/datev?branch=master)
## Installation
@@ -22,31 +24,33 @@
$ gem install datev
## Usage
+To export bookings, you need an BookingExport instance with an array of records. Example:
+
```ruby
export = Datev::BookingExport.new(
'Herkunft' => 'XY',
'Exportiert von' => 'Chief Accounting Officer',
'Berater' => 1001,
'Mandant' => 456,
'WJ-Beginn' => Date.new(2016,1,1),
'Datum vom' => Date.new(2016,6,1),
'Datum bis' => Date.new(2016,6,30),
'Bezeichnung' => 'Beispiel-Buchungen'
-) # For available hash keys see /lib/datev/header.rb
+) # For available hash keys see /lib/datev/base/header.rb
export << {
'Belegdatum' => Date.new(2016,6,21),
'Buchungstext' => 'Fachbuch: Controlling für Dummies',
'Umsatz (ohne Soll/Haben-Kz)' => 24.95,
'Soll/Haben-Kennzeichen' => 'H',
'Konto' => 1200,
'Gegenkonto (ohne BU-Schlüssel)' => 4940,
'BU-Schlüssel' => '8'
-} # For available hash keys see /lib/datev/booking.rb
+} # For available hash keys see /lib/datev/base/booking.rb
export << {
'Belegdatum' => Date.new(2016,6,22),
'Buchungstext' => 'Honorar FiBu-Seminar',
'Umsatz (ohne Soll/Haben-Kz)' => 5950.00,
@@ -58,9 +62,17 @@
export.to_file('EXTF_Buchungsstapel.csv')
```
Result: [CSV file](examples/EXTF_Buchungsstapel.csv)
+
+All records are validated against the defined schema.
+
+Beside bookings, some other exports are available, too:
+
+* `AccountExport` ("Kontenbeschriftungen")
+* `ContactExport` ("Stammdaten")
+
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.