Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New plugin: Fidor Bank AG #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wizonesolutions
Copy link

Luckily, their CSV is rather organized. There are only four columns and two formats for these.
I used string-splitting and regular expession parsing to extract the Payee, and the rest of
the data was straightforward. I based this off the 1822direkt plugin.

Hope somebody finds it useful.

Copy link

@mirkodziadzka-avi mirkodziadzka-avi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. I added some comments to your pull request. Can you please have a look?

Also, can you provide an example CSV file? I know, that we have no tests yet but I would like to add them in the future.

lines = f.readlines()
parser = FidorBankAGParser(lines)
parser.statement.account_id = self.settings['account']
parser.statement.bank_id = self.settings.get('bank', '50050201')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This default 50050201 does not make sense with Fidor Bank, it's the BLZ from 1822direkt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Fidor, looks like it is 70022200


Some other config options you may set are:

* *bank* (default: 50050201)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be de default for Fidor, this is the BLZ from 1822direkt

@@ -0,0 +1,91 @@
~~~~~~~~~~~~~~~~~~~~~~~
ofxstatement-fidorbank UPDATE THIS README

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove/update this "UPDATE THIS README"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already been updated so this is safe to remove

=====

.. code:: bash
ofxstatement convert -t fidorbank umsaetze-0123456789-03.02.2018_15_05.csv test.ofx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this is default filename for CSV files downloaded from Fidor? I would like to keep the names of the files realistic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's e.g. 2018-05-26-164912-Fidorpay-Transaktionen.csv

# first element for the Payee.
desc_parts = beschreibung2.split(",")
desc1_parts = ("" + desc_parts[0]).split(":")
sl.payee = ("" + desc1_parts[1]).strip()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding the empty string here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not that experienced in Python, and I wanted PyCharm's code hints to work properly. So type coercion, basically.


Edit config. The *account* is the ID used by your accounting program to
associate the transactions with a certain account. Probably you want to use
your bank account number (Kontonummer) i.e. the last 10 digits of your IBAN.
(Note: YNAB does not seem to care about this field, since you import directly
to the account screen anyway.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least in classic YNAB, you can import a file by starting YNAB with this file as an argument. This is what my import process is doing. It then uses the account data to find out into which of the YNAB accounts it should import this file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using this with the web version of YNAB, so less relevant. It might still do this from the All Accounts screen, but I haven't tried.

@wizonesolutions
Copy link
Author

wizonesolutions commented May 27, 2018 via email

@wizonesolutions
Copy link
Author

Here's a test CSV:

Datum;Beschreibung;Beschreibung2;Wert
28.05.2018;Gutschrift Example Payee IBAN: DE89370400440532013000 BIC: KSPKAT2KXXX INV-0218;Absender: Example Payee, IBAN: DE89370400440532013000, BIC: FDDODEMMXXX;1.234,56
23.05.2018;Überweisung: SI19 ReferenceCode;Empfänger: Slovenian Payee, IBAN: SI56263300012039086, BIC: BSLJSI2XXXX;-2,34
17.05.2018;MasterCard Onlinekauf bei Example Payee;"";-123,45
09.05.2018;MasterCard Onlinekauf bei PP*1234CODE;"";-1,50
09.05.2018;MasterCard Gutschrift in Höhe von 1,50 Euro bei PP*1234CODE;"";1,50

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants