Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Fhp/Parser/MT940.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ protected function parseDescription($descr)
$index = (int) $m[1];
if ((20 <= $index && $index <= 29) || (60 <= $index && $index <= 63)) {
if (20 <= $index && $index <= 29) {
$description1 .= $m[2];
$description1 .= $m[2] . PHP_EOL;
} else {
$description2 .= $m[2];
$description2 .= $m[2] . PHP_EOL;
}
$m[2] = trim($m[2]);
if (!empty($m[2])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Tests/Fhp/Parser/MT940Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function testParseDescriptionLines()
$parser = new MT940(implode("\r\n", $rawData));
$result = $parser->parse(MT940::TARGET_ARRAY);
$this->assertEquals(
'EREF+CCB.122.UE.266455SVWZ+Re 17-H-0005 vom 24.04.2017',
'EREF+CCB.122.UE.266455' . PHP_EOL . 'SVWZ+Re 17-H-0005 vom 24.04' . PHP_EOL . '.2017',
$result['2017-04-28']['transactions'][0]['description']['description_1']
);
}
Expand Down