Skip to content
Snippets Groups Projects

Dev/15524

Merged Laurent requested to merge dev/15524 into WIP
Compare and
+ 255
112
Preferences
Compare changes
Files
@@ -409,19 +409,26 @@ class notice_integration
if ($champ['code'] != $champ_numero)
continue;
$numbers = '';
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);
$numbers = substr($champ['valeur'],$i);
break;
}
}
$trav = explode(' ', $champ['valeur']);
$numero = $trav[0];
}
$complement_titre = '';
if ($numero = explode(' ', $numbers)[0])
$complement_titre = trim(substr($champ['valeur'], strpos($numero, $champ['valeur']) + strlen($numero)));
else
$numero = $champ['valeur'];
}
$this->notice_sgbd->add_field('461', '11', 't' . $this->notice['titre_princ']);
$this->notice_sgbd->add_field('461', '11', 'v' . $numero);
if ($complement_titre)
$this->notice_sgbd->add_field('461', '11', 'o' . $complement_titre);
$this->notice_sgbd->add_field('995', ' ', $table_champs);
$this->notice_sgbd->update();
$data = $this->notice_sgbd->getFullRecord();