wimverstuyf / php-coda-parser

PHP parser for Belgian CODA banking files
GNU Lesser General Public License v3.0
42 stars 25 forks source link

Fix for Issue #29: Extract details for totalized transactions when available #30

Closed driesraman closed 2 weeks ago

driesraman commented 3 months ago

Summary

This pull request addresses the issue reported in https://github.com/wimverstuyf/php-coda-parser/issues/29. The problem concerns to the incorrect parsing of grouped transactions with detailed transaction lines (e.g. SEPA transactions).

Problem Grouped transactions with a totalized amount (Transaction code in record 21 starting with "1") followed by detailed transactions (Transaction code in record 21 starting with "5") are not parsed correctly. The parser treats the entire group and its detailed transactions as a single transaction, leading to the following issues:

Solution The changes in this pull request modify the parsing logic to:

Impact These changes ensure that grouped transactions are no longer incorrectly concatenated, and each detailed transaction retains its individual details, improving the accuracy of parsed transaction data.

Feel free to reach out if there are any questions or further clarifications needed.

Thank you for reviewing this pull request.

wimverstuyf commented 2 weeks ago

Thank you for the PR. The changes have been merged. The last change for the structured message has not been accepted (breaks previous functionality).