ing-diba: wrong bookingDate year
Closed this issue · 0 comments
andrenam commented
with INGDiba
this MT940 raw data gets parsed as
:20:0
:21:NONREF
:25:50010517/5414367241
:28C:0
:60F:C171126EUR313,52
:34F:EURD10,99
:13D:1711272221-0000
:61:1711271201D10,99NMSCNONREF
:86:005?00Lastschrifteinzug?10009599?20SVWZ+NETFLIX.COM 866.579.71?21
72Datum 27.11.2017 Zeit 04.?2246Kaufumsatz VISA CardEUR 1?230,99?
32NETFLIX.COM 86?336-579-7172
-
Fhp\Model\StatementOfAccount\Transaction Object
(
[bookingDate:protected] => DateTime Object
(
[date] => 2016-12-01 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
[valutaDate:protected] => DateTime Object
(
[date] => 2017-11-27 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
[amount:protected] => 10.99
[creditDebit:protected] => debit
[bookingText:protected] => Lastschrifteinzug
[description1:protected] => SVWZ+NETFLIX.COM 866.579.7172Datum 27.11.2017 Zeit 04.46Kaufumsatz VISA CardEUR 10,99
[description2:protected] =>
[bankCode:protected] =>
[accountNumber:protected] =>
[name:protected] => 6-579-7172
)
with valuta date: 2017-11-27
and booking date: 2016-12-01
when instead the real booking date seems to be: 2017-12-01
Line 126 in MT940.php seems to be responsible:
https://github.com/mschindler83/fints-hbci-php/blob/master/lib/Fhp/Parser/MT940.php#L126
substr($transaction, 2, 2)
and substr($transaction, 6, 2)
evaluate to 11
and 12
,
so $year
gets decremented.