sandermarechal / jejik-mt940

An MT940 bank statement parser for PHP
MIT License
82 stars 33 forks source link

Cannot read ING files #14

Closed reyezstef closed 6 years ago

reyezstef commented 9 years ago

I suppose this code should be changed in:

Parser/Ing.php

From:

public function accept($text) { return substr($text, 7, 6) === 'INGBNL'; }

To:

return substr($text, 6, 6) === 'INGBNL';

Cyberwizzard commented 9 years ago

I discovered the same issue and when trying to read current MT940 exports from the Dutch ING banking website, I found that the information extracted was incomplete or information ended up in the wrong fields.

I made my own extension which uses this library but provides an updated ING parser which extracts more information. Since I am new to composer, I have uploaded my package to github without adding it to the composer index.

My cyberwizzard/MT940 library depends on jejik/MT940 and can be installed using composer. To just replace the Ing parser, it can be found here: cyberwizzard/MT940/Parser/Ing.php.

As I currently do not have access to a recent MT940 bank statement, I can not verify that the extraction of this class into my own library was flawless. This will be tested shortly but feel free to try it out.

My library also adds support for Rabobank CSV formatted bank statements.

Both the ING and Rabobank parser are made using the bank statement format description provided by the respective banks and have been validated using recent bank statement exports.

sandermarechal commented 6 years ago

ING has been fixed