diff --git a/templates/ddt/body.php b/templates/ddt/body.php
index c15e830ab..cb9903d81 100755
--- a/templates/ddt/body.php
+++ b/templates/ddt/body.php
@@ -96,7 +96,7 @@ foreach ($righe as $riga) {
$r['descrizione'] = str_replace('Rif. '.strtolower((string) $key), '', $r['descrizione']);
if (preg_match("/Rif\.(.*)/s", $r['descrizione'], $rif2)) {
- $r['descrizione'] = str_replace('Rif.'.strtolower($rif2[1]), '', $r['descrizione']);
+ $r['descrizione'] = str_replace('\nRif.'.strtolower($rif2[1]), '', $r['descrizione']);
$text .= ''.$rif2[0].'';
}
@@ -115,7 +115,7 @@ foreach ($righe as $riga) {
$autofill->count($text);
}
}
- $r['descrizione'] = preg_replace("/Rif\.(.*)/s", '', (string) $r['descrizione']);
+ $r['descrizione'] = preg_replace("/(\r\n|\r|\n)Rif\.(.*)/s", '', (string) $r['descrizione']);
}
$source_type = $riga::class;
@@ -162,8 +162,6 @@ foreach ($righe as $riga) {
echo '
'.$text.'';
-
- $autofill->count($text, true);
}
echo '