diff --git a/cosmogramme/php/classes/classe_notice_integration.php b/cosmogramme/php/classes/classe_notice_integration.php index 3d353e71242c8c84a23ce8ca71c65df1ba09eb13..e185a12d475e8ae21c2faa7af292dab56aa06c7a 100644 --- a/cosmogramme/php/classes/classe_notice_integration.php +++ b/cosmogramme/php/classes/classe_notice_integration.php @@ -406,9 +406,18 @@ class notice_integration foreach($champs as $champ) { $table_champs[] = [$champ['code'], $champ['valeur']]; - if ($champ['code'] == $champ_numero) { - $numero = $champ['valeur']; - } + if ($champ['code'] != $champ_numero) + continue; + + for ($i=0; $i<strlen($champ['valeur']); $i++) { + $car = substr($champ['valeur'],$i,1); + if ($car >= '0' and $car <= '9') { + $champ['valeur'] = substr($champ['valeur'],$i); + break; + } + } + $trav = explode(' ', $champ['valeur']); + $numero = $trav[0]; } $this->notice_sgbd->add_field('461', '11', 't' . $this->notice['titre_princ']);