sandermarechal / jejik-mt940

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

Update that will more correctly find the book date. #24

Closed PatrickRatelband closed 6 years ago

PatrickRatelband commented 6 years ago

edit: Removed the passing of the StatementInterface to the transaction method as not all banks adhere to only exporting transactions with book dates between the opening and closing balance dates.

PatrickRatelband commented 6 years ago

I wrote this update because in some rare instances (bulk direct debits and foreign currency transfers for instance) the book date is actually correctly after the value date of a transaction. After the earlier fix of the book date an analysis of the data revealed this discrepancy and resulted in book dates differing by almost a year from the value date.

I am currently working on the results of the tests, to see if they should be updated to reflect this as some of them are failing.

PatrickRatelband commented 6 years ago

The tests fail for PHP 5.7 and up, it seems this is not a problem with the code, but with the CI itself.

sandermarechal commented 6 years ago

Looks good! I fixed the unittests. I was using an old PHPUnit version and Travis was using a much newer version.