diff --git a/lib/Fhp/Parser/MT940.php b/lib/Fhp/Parser/MT940.php index 82c4dd0..ddb959f 100755 --- a/lib/Fhp/Parser/MT940.php +++ b/lib/Fhp/Parser/MT940.php @@ -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])) { diff --git a/lib/Tests/Fhp/Parser/MT940Test.php b/lib/Tests/Fhp/Parser/MT940Test.php index 5dbeb89..b988ad0 100644 --- a/lib/Tests/Fhp/Parser/MT940Test.php +++ b/lib/Tests/Fhp/Parser/MT940Test.php @@ -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'] ); }