Open driesraman opened 4 days ago
Hi,
I have created a pull request with a proposal to address this issue. You can find the PR here: https://github.com/wimverstuyf/php-coda-parser/pull/30.
Please don't hesitate to let me know if you have any remarks or feedback.
Best regards, Dries
Hi,
I have encountered an issue with the library when handling grouped transactions with a totalized amount for (SEPA-)transactions (Transaction code in record 21 starting with "1" - Amount as totalized by the customer -
$transactionPart1Line->getTransactionCode()->getType()->getValue() === '1'
) but followed by detailed transactions (Transaction code in record 21 starting with "5" - detail lines -$transactionPart1Line->getTransactionCode()->getType()->getValue() === '5'
).When processing such transactions, all detailed information and the grouped transaction are treated as a single transaction. As a result, the detailed information is concatenated into one transaction, causing the loss of individual transaction details. This also results in incorrect transaction information, like the (structured-)message, which contains concatenated information from all transactions.
Below is an example of a CODA file that demonstrates this issue (also attached as "KBC-coda-issue.txt"):
Wouldn't the expected behavior be to ignore the grouped line (
$transactionPart1Line->getTransactionCode()->getType()->getValue() === '1'
) if detail lines are available ($transactionPart1Line->getTransactionCode()->getType()->getValue() === '5'
) in the file and provide the detailed transaction information?Best regards, Dries
KBC-coda-issue.txt