Skip to content

Line breaks in transaction descriptions #481

@roben

Description

@roben

Hi everyone,

we noticed an issue in the way the description lines are joined. Mainly, there is no separator at all (see MT940.php):

$description1 .= $m[2];

This causes descriptions to look like this:

Darl. Abrechnung 1000000000Akt. Sollzinssatz 1,4000%

Just as a proof of concept I changed it to this:

if ($description1 !== '') $description1 .= PHP_EOL;
$description1 .= $m[2];

Which leads to this description which is arguably better:

Darl. Abrechnung 1000000000
Akt. Sollzinssatz   1,4000%

But, of course, this is a breaking change, especially if the description is used to identify the transaction in a database when syncing.

So maybe this could be put in some kind of configuration (which we don't have, as far as I know).

One could set the separator as a property in MT940, passed over from GetStatementOfAccount but this feels cumbersome. Another place to put this could be SEPAAccount which has the nice addition that the behavior can be controlled per bank, if they spit their descriptions differently.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions