Libellé
This commit is contained in:
parent
1f94f5de48
commit
c019b9a8dd
@ -179,7 +179,10 @@ $tabDico = array(
|
||||
'nationalite' => 'nationalite',
|
||||
'pays' => 'pays',
|
||||
'nafEnRncs' => 'naf AS nafEnRncs',
|
||||
'cjRncs' => 'cj AS cjRncs',
|
||||
'cjRncs' => array(
|
||||
'sql' => 'cj AS cjRncs',
|
||||
'table' => 'SELECT * FROM jo.tabFJur',
|
||||
),
|
||||
'dateImma' => 'dateImma',
|
||||
'dateRad' => 'dateRad',
|
||||
'capitalType' => 'capitalType',
|
||||
@ -442,8 +445,7 @@ foreach($tabExtract as $key)
|
||||
} else {
|
||||
|
||||
$stmt = $dbMetier->query($elementsup['table']);
|
||||
$result = $stmt->fetchAll();
|
||||
${'tab'.ucfirst($key)} = $result;
|
||||
${'tab'.ucfirst($key)} = $stmt->fetchAll();
|
||||
|
||||
}
|
||||
if( array_key_exists('sql', $select['cle'][$key]) && $select['cle'][$key]['sql']!='' ) {
|
||||
@ -671,25 +673,24 @@ foreach($tabIdentifiant as $item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Traitement des libellés génériques
|
||||
foreach($select as $item)
|
||||
{
|
||||
if ( in_array($item.'Lib', $tabEntete) && isset(${'tab'.ucfirst($item)}) )
|
||||
{
|
||||
$retour = 'Non trouvé';
|
||||
$codeFromData = $tabData[$row][$item];
|
||||
foreach( ${'tab'.ucfirst($item)} as $code => $label ) {
|
||||
if ( $codeFromData == $code ) {
|
||||
$retour = $label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$tabData[$row] = $tabData[$row] + $retour;
|
||||
}
|
||||
//Traitement des libellés génériques
|
||||
foreach($select as $item)
|
||||
{
|
||||
if ( in_array($item.'Lib', $tabEntete) && isset(${'tab'.ucfirst($item)}) )
|
||||
{
|
||||
$retour = 'Non trouvé';
|
||||
$codeFromData = $tabData[$row][$item];
|
||||
foreach( ${'tab'.ucfirst($item)} as $code => $label ) {
|
||||
if ( $codeFromData == $code ) {
|
||||
$retour = $label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$tabData[$row] = $tabData[$row] + $retour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Enregistrement clés de doublon pour rappel
|
||||
@ -823,6 +824,10 @@ function situationJuridiqueData($siren, $nic, $values = false)
|
||||
$tabData['situationDernEven']='';
|
||||
}
|
||||
|
||||
if (empty($tabData['situationJuridique'])) {
|
||||
$tabData['situationJuridique'] = 'NC';
|
||||
}
|
||||
|
||||
return $tabData;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user