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

ING Bank NL how to start with import #119

Open
jpduyx opened this issue Sep 19, 2023 · 1 comment
Open

ING Bank NL how to start with import #119

jpduyx opened this issue Sep 19, 2023 · 1 comment

Comments

@jpduyx
Copy link

jpduyx commented Sep 19, 2023

I'm trying to get started with beancount (v2) and figured that beangulp is probably the best / future way for importers?

I'm in the Netherlands and would like to start with importing my ING Bank account.
I found an importer online for ING DiBa in germany, or Rabobank NL but those don't match the format of my files.

We (or at least I in my account) can download 4 different formats:

  1. csv (ssv)- semicolon delimiter (including field: tag and field: Balance after Transaction
  2. csv - comma delimited
  3. pdf file 2 options: ascending or descending
  4. csv - comma delimited - only balance statements

It looks like 1 semicolon delimited csv (ssv) file is probalby the newest and includes "Tags" (i guess I can add a tag to a transaction using eg my banking app on my phone) and also has a field for "Balance after transaction", which i guess both can be handy. So lets focus on this one.

It is possible to download all (payment / checking) accounts in one csv file (not for PDF).
Each file can contain many years or a shorter time period of choice.

It is also possible to download a CSV (not ssv) for a connected savings account. But I don't see the use of this as I can only withdraw to the main account anyway, so any transactions will pass that file already.

By trial and error I found there can be an english language header in the downloaded semicolon separated file or a dutch language header ... depending on your personal settings for the website itself (mijn.ing.nl). It would be great to avoid convusion and be able to use multiple headers languages also in the importer.

Some other things:

  • filename format single account download: IBAN_dd-mm-yyyy_dd-mm-yyy.csv
  • (english) fields: Date, Name / Description, Account, Counterparty, Code, Debit/credit, Amount (EUR), Transaction type, Notifications, Resulting balance, Tag
  • decimal separator = ","
  • NO thousands separator
  • Amount field never contains a negative number.
    • "Debit / credit" field containing "Debit" or "Credit" or in dutch "Bij" or "Af" to determins if the amount is incoming or outgoing
  • date format is YYYYMMDD
  • account / counter party account number uses the european IBAN format

My questions

Is it possible to use a generic CSV import module for this kind of ssv / csv file?
Then where can I find an example how to set the Amount negative depending on the value in "Debit / credit" field, and set the decimal Delimiter to ","?

I only found an example where Debit / Credit amounts each has their own column

If not possible, what would be the best way to proceed? Invent the wheel and write a new importer, or is it possible to inherit from a generic CSV importer and add the required logic?

Or is it preferred to add this logic to the generic CSV importer for others to be able to use it in similar situations?

Based on Name / Description or "TheirIBAN" field alone it would in many cases be possible to match with a Ledger Account name ... in some cases the invoice number or some other number can be found in the "Notifications" field ... which could be used to match more precisely ... but i would first like to be able to read the CSV file and make simple matches.

Where should I start?

See attached a curated example of the ssv format ... hope my curating hasn't didn't change the original file too much... i had to repair lost quotes and changed date formatting after checking the file in LibreOffice and saving it back ...

IBAN_dd-mm-yyyy_dd-mm-yyy.csv

Thank you

@ThomasdenH
Copy link

Hi! Did you find an answer yet?

Did you have a look at the examples, such as this one?

To handle the 'Af' en 'Bij' situation, I would add two columns:

amount = csvbase.Amount('Af')
bij = csvbase.Amount('Bij')

After that you can override finalize to actually use these columns and change the amount to be Af - Bij (or should those be reversed?). I have a more complex example that overrides finalize in my own importers repository.

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

No branches or pull requests

2 participants