Repository navigation
Conversation
…elds
Field 70E HOLD consists of numbered lines; the acquisition price and its
currency start line 2. DKB fills further subfields in line 1, e.g. the date
of the last movement:
:70E::HOLD//1STK++++20250825
2224,5983333+EUR
The parser joins continuation lines and expected "2" directly after "STK",
so the acquisition price was dropped for all holdings. Line 2 is now read
from the block with its original line breaks; the previous pattern stays as
fallback. This also fixes the string/float concatenation in the cast, so
the corresponding phpstan baseline entry is removed.
Fixes nemiah#464
fds2610
force-pushed
the
mt535-acquisition-price
branch
from
November 2, 2026 08:10
d10ed7e to
a09e0f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #464
Field 70E HOLD consists of numbered lines; the acquisition price and its currency start line 2. The parser joins continuation lines and expected the "2" of line 2 directly after
STK. As soon as a bank fills further subfields in line 1, the acquisition price is dropped. DKB (HKWPD v6) sends e.g.and the example in the specification (FinTS 3.0 Finanzdatenformate, B.4) looks the same way (
1STK+805+00028+LU+20240822+/22,5624+EUR+). #464 was closed, but the fix never made it into the code.Changes:
\r\nor@@); the previous pattern stays as a fallback.(float) $a.'.'.$bpassed a string tosetAcquisitionPrice(); fixed, so the phpstan baseline entry for it is removed. No new phpstan errors.Tests/Unit/MT535/MT535AcquisitionPriceTest.php: DKB format, specification example, old format,@@divider, no 70E.Verified with a real DKB statement of holdings (8 positions, all with acquisition price now).
This is (partly) generated code and I as human vouch for it's correctness.
I am using this code in my own repo. If something breaks, i'll fix it. Greets, Felix