fruitl00p / php-mt940

A mt940 parser in PHP
MIT License
103 stars 60 forks source link

csv - parcer #8

Closed bvandoesburg closed 7 years ago

bvandoesburg commented 9 years ago

Hello, would it also be able to create a parcer that will be able to convert .csv files into a digital bankstatement.

Only business bank accounts have the option to generate a mt940-file. People who don't have business account can't use this parcer. It would be great if this option could be included in the current parcer. Or maybe a second parcer can be created to convert .csv files into digital bank statements.

I have added a manual from the Rabobank. The descripe how the file is build. I can provide more examples of .csv files from different banks if needed. But I want to do this via personal email. So please let me know when you need information.

Thanks, Boris

bvandoesburg commented 9 years ago

Well, I can't upload the pdf manual. It can be found via the attached link.

https://www.rabobank.nl/images/formaatbeschrijving_csv_kommagescheiden_nieuw_29539176.pdf

fruitl00p commented 9 years ago

This is the ING format description and seems pretty straight forward: https://www.ing.nl/media/ING_csv_mingz_aug14_24_juli_tcm162-45557.pdf

basically only 1 format remains as of 31-januari 2015:

"{Ymd}","{from account holder}","{from account number}","{to account number}","{ING transactioncode}","{D / C}","{Amount}","{Transaction type}","{description}"

That last field will hold various SEPA related info if applicable..

From what i gather from Rabobank is a similar but different kind of format:

"{from account}","{currency code}","{value-date}","{D / C}","{amount}","{to account}","{to account name}","{entry date}","{transaction type}","{filler?}","{descrtion part 1}","{descrtion part 2}","{descrtion part 3}","{descrtion part 4}","{descrtion part 5}","{descrtion part 6}","{SEPA transaction code}","{SEPA to account id}","{SEPA mandate code}"

Now we could introduce a CSV parser which translates CSV contents into banking statements / transactions... but i wouldn't be able to build a detection for the type... (not realistically) other than looking at the first / second row of the CSV and hoping for the right amount of fields ;)

Anyone have a better idea ?

fruitl00p commented 9 years ago

As discussed i thougt i'd mention @LonelyPullRequests :)

fruitl00p commented 9 years ago

@lonelypullrequests ?

fruitl00p commented 7 years ago

After consideration, i'd rather see this as a seperate package somehow (and maybe extract the transaction and statement definitions out of this package and into a shared one... ?)

I'll close the issue for now. If the feature is still required / wanted we could have another look later / seperately.