Comments (7)
Have you run it through a debugger? Also the ING parser was created for the Dutch ING bank, it could be that the Polish ING has a different markup.
My suggestion to debug is allow the parser to detect it. Should it fallback to the generic parser, it should give a clue as to where to start looking ;) (and confirm that the Dutch ING and Polish ING differ in their MT940)
from php-mt940.
Hmmm... thanks for the link to the docs...
It seems ING Poland has some type of prefix for all the :86: lines... (as mentioned in the docs) You might want to have a look at pages 60+ from the PDF you mentioned. It should be doable to create a custom / new ING-Poland parser based on one of the other already available parsers.
I currently don't have the time personally to look too deep into this, but PRs are welcome ;)
(will flag this issue as #hacktoberfest to get some attention)
from php-mt940.
I did some "debugging" ;-) but wasn't able to fix it really. It all starts with parseStatementData()
in Engine.php
.
My sta begins with:
:20:MT940
:25:/PL12345678912345678912345678
:28C:9
:60F:C190930PLN66666,66
:61:1909020902D850,39S02097202028342
:86:020
:86:020~00IBCG
The problem begins in:
php-mt940/src/Parser/Banking/Mt940/Engine.php
Lines 172 to 182 in d7cdbc0
As I understand my statements are not separated by ^:20
but by ^:86:
so I "fixed" '/(^:20:|^-X{,3}$|\Z)/m'
into '/(^:86:|^-X{,3}$|\Z)/m'
and got an array with 156 entries as result.
But still verry messy. Just an example:
15 =>
object(Kingsquare\Banking\Statement)[26]
private 'bank' => string 'ING' (length=3)
private 'account' => string '' (length=0)
private 'transactions' =>
array (size=1)
0 =>
object(Kingsquare\Banking\Transaction)[27]
...
private 'startPrice' => float 0
private 'endPrice' => float 0
private 'startTimestamp' => int 0
private 'endTimestamp' => int 0
private 'number' => string '' (length=0)
private 'currency' => string '' (length=0)
public 'rawData' => string '020~00IBCG
~20Faktura 11-116089-09196
~21~22
~23~24
~25
~3010301931~319000010015184076
~32Orange Polska S.A. Al. ~33Jerozolimskie 160 02-326
~34020
~38PL42103019319000010015184076
~62Warszawa
:61:1909050905D1,00S02097202113823
' (length=239)
from php-mt940.
I have found the english description for MT940 used by ING-PL https://www.ing.pl/_fileserver/item/1003276
I guess it should be :61:
not :86:
but the result with 77 entries is still messy.
At least 77
matches the real transaction count. Same transaction as before as an example of the result I'm getting:
7 =>
object(Kingsquare\Banking\Statement)[11]
private 'bank' => string 'ING' (length=3)
private 'account' => string '' (length=0)
private 'transactions' =>
array (size=0)
empty
private 'startPrice' => float 0
private 'endPrice' => float 0
private 'startTimestamp' => int 0
private 'endTimestamp' => int 0
private 'number' => string '' (length=0)
private 'currency' => string '' (length=0)
public 'rawData' => string '1909050905D141,45S02097202112873
:86:020
:86:020~00IBCG
~20Faktura 11-116089-09196
~21~22
~23~24
~25
~3010301931~319000010015184076
~32Orange Polska S.A. Al. ~33Jerozolimskie 160 02-326
~34020
~38PL42103019319000010015184076
~62Warszawa
' (length=250)
from php-mt940.
Thank you, I'll try to find some time :-)
from php-mt940.
@fruitl00p So I've started writing the IngPl parser, looks promising :-) But I'll have few questions. Is it OK to ask them using separate Issues?
from php-mt940.
@websafe a single thread is also doable.. .Just be sure to include a reproducable scenario et al... You might even go as far as creating a PR which isnt finished yet so I might be able to see how far your getting..
Its really up to you ;)
from php-mt940.
Related Issues (20)
- KNAB parser fixes HOT 1
- update the ABN engine to 1.4 HOT 3
- KNAB - New structured file HOT 13
- Registering new Engines doesn't respect priority HOT 5
- Rabobank /PREF handling HOT 5
- Can you modify your code HOT 3
- Can't parse file HOT 2
- Problem parsing ABN Amro mt940 'Dagafschrift' HOT 2
- ABNAMRO Transaction Entry Date parsing bug (using current years instead of booking year) HOT 5
- Statements in different currencies to not have correct Start/End price HOT 2
- price is not correctly parsed HOT 1
- Basic example HOT 1
- getRelativePrice() missing HOT 3
- ING sanitizeDescription update HOT 5
- ING EntryDate fix HOT 4
- Correction to ABNAMRO description + AccountName filtering
- Writing MT940 HOT 2
- Knab transactions HOT 3
- [QUESTION] Is this still being maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-mt940.