fruitl00p / php-mt940

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

ING EntryDate fix #66

Closed BerendSpigt closed 5 years ago

BerendSpigt commented 5 years ago

I've used this package for years without any problems at all, but suddenly in the past months I got a few transactions with wrong dates. The wrong dates occurred with bounced direct debit transactions. Those transactions are given (by ING) a "value date" which sometimes is weeks earlier than the "entry date".

The main parser doesn't parse the entry date. It only uses the value date and copies the date to the entry date.

According to the spec the Value/Entry format is: YYMMDD[MMDD] which is the same as used in the ABN engine.

So I copied the parseTransactionEntryTimestamp function from ABN to ING, and the date parsing is fixed now.

Anyways, thanks for the great package!

fruitl00p commented 5 years ago

@BerendSpigt hmmm... interesting.

I'll create a patch and PR to match. Do you have any test data to verify? That way we can make sure it stays fixed too :)

Also, have you looked at the PR #63 ? Does that work for you too and if not, why not ? :)

lllopo commented 5 years ago

This should be fixed for all banks, as it is by MT940 spec. I'm having the same issue while parsing KNAB statements.

Nayels commented 5 years ago

Same issue here! Any news?

fruitl00p commented 5 years ago

@Nayels / @Nayels the original poster of the issue hasn't responded yet, but lets give it a whirl and see what happens :)