diff --git a/includes/infogreffe/infogreffe_courrier.php b/includes/infogreffe/infogreffe_courrier.php index d9b477a44..5af15e57e 100644 --- a/includes/infogreffe/infogreffe_courrier.php +++ b/includes/infogreffe/infogreffe_courrier.php @@ -15,10 +15,24 @@ $dejaCommande = false; $noemail = false; $sameLogin = false; $idCommande = 0; + //Vérification des commandes +if (preg_match('/^([0-9]{4})[_sociaux-|_-]/', $ref, $matches)) +{ + $searchRef = '^'.$matches[1].'[_-|_sociaux-]'; +} +elseif (preg_match('/^([0-9]{4})_consolide-/', $ref, $matches)) +{ + $searchRef = '^'.$matches[1].'_consolide-'; +} +else +{ + $searchRef = $ref; +} + $rep = mysql_select('commandes', ' idCommande, login, emailCommande, dateCommande', - "siren=$siren AND refDocument='$ref'"); + "siren=$siren AND refDocument='$searchRef'"); //Fichier de vérouillage commande en cours $lockFile = PATH_SITE.'/cache/'.$siren.'-'.$ref.'.txt'; diff --git a/www/pages/liasse.php b/www/pages/liasse.php index 25ff58d88..10a751afe 100644 --- a/www/pages/liasse.php +++ b/www/pages/liasse.php @@ -97,7 +97,7 @@ foreach($tabUnit as $unit)