Utilisation du bon siret pour récupérer les informations du cache, issue #0000471

This commit is contained in:
Michael RICOIS 2010-11-08 09:10:52 +00:00
parent 79bdb3e79f
commit 4be31e27f9
4 changed files with 17 additions and 10 deletions

View File

@ -20,6 +20,7 @@ $tabEntrep['raisonSociale'] = $etab['Nom'];
$tabEntrep['id'] = $etab['id'];
$tabEntrep['siren'] = $etab['Siren'];
$tabEntrep['siret'] = $etab['Siret'];
$tabEntrep['siretSiege'] = $etab['SiretSiege'];
$tabEntrep['tva'] = $etab['TvaNumero'];
if (isset($etab['Isin'])) {
$tabEntrep['isin'] = $etab['Isin'];

View File

@ -271,10 +271,11 @@ function menu_href_marques()
function menu_href_indiscore()
{
global $siret, $siren, $idEntreprise;
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
{
return './?page=indiscore&siret='.$siren.'&idEntreprise='.$idEntreprise;
return './?page=indiscore&siret='.$siret.'&idEntreprise='.$idEntreprise;
} else {
return '#';
}
@ -282,7 +283,8 @@ function menu_href_indiscore()
function menu_href_indiscoreplus()
{
global $siret, $siren, $idEntreprise;
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
$usersAuthorized = array('ylenaour','jmartory','mricois','mheitz','testreunica','reunicacsf');
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
@ -310,10 +312,11 @@ function menu_href_creditsafe()
function menu_href_rsynthese()
{
global $siret, $siren, $idEntreprise;
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
if ( $siret*1!=0 ) {
$href = './?page=rsynthese&siret='.$siren.'&idEntreprise='.$idEntreprise;
$href = './?page=rsynthese&siret='.$siret.'&idEntreprise='.$idEntreprise;
}else{
$href = '#';
}
@ -322,10 +325,11 @@ function menu_href_rsynthese()
function menu_href_indiscore3()
{
global $siret, $siren, $idEntreprise;
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
if ( $siret*1!=0 ) {
$href = './?page=indiscore3&siret='.$siren.'&idEntreprise='.$idEntreprise.'&niveau=2';
$href = './?page=indiscore3&siret='.$siret.'&idEntreprise='.$idEntreprise.'&niveau=2';
}else{
$href = '#';
}
@ -334,10 +338,11 @@ function menu_href_indiscore3()
function menu_href_indiscore2()
{
global $siret, $siren, $idEntreprise;
global $idEntreprise;
$siret = $_SESSION['tabInfo']['entrep']['siretSiege'];
$href = false;
if ( $siret*1!=0 ) {
$href = './?page=indiscore2&siret='.$siren.'&idEntreprise='.$idEntreprise;
$href = './?page=indiscore2&siret='.$siret.'&idEntreprise='.$idEntreprise;
}else{
$href = '#';
}

View File

@ -52,6 +52,7 @@ function etabSession($siret, $idEntreprise = 0){
$tabEntrep['id'] = $etab['id'];
$tabEntrep['siren'] = $etab['Siren'];
$tabEntrep['siret'] = $etab['Siret'];
$tabEntrep['siretSiege'] = $etab['SiretSiege'];
$tabEntrep['tva'] = $etab['TvaNumero'];
$tabEntrep['isin'] = $etab['Isin'];
$tabEntrep['AutreId'] = $etab['AutreId'];

View File

@ -31,7 +31,7 @@ $siret = page_param('siret');
$siren = page_param('siren');
$idEntreprise = page_param('idEntreprise');
$raisonSociale = etabSession($siret, $idEntreprise);
FB::log($_SESSION, 'SESSION');
//Chargement du contenu
switch ($page)
{