From d63a67706c0ff1eb74ab8c786e58f139e519f44c Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 11 Aug 2010 15:12:45 +0000 Subject: [PATCH 1/2] =?UTF-8?q?ajout=20date=20et=20compl=C3=A9ment=20sur?= =?UTF-8?q?=20la=20liste=20des=20=C3=A9tablissements,=20issue=20#0000327?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/identite/content.php | 2 +- includes/scoresws/identite.php | 5 ++-- www/pages/etablissements.php | 49 +++++++++++++++++++++++++--------- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/includes/identite/content.php b/includes/identite/content.php index d626d2bb5..5d5c12bab 100644 --- a/includes/identite/content.php +++ b/includes/identite/content.php @@ -237,7 +237,7 @@ $element = formatElement('identite', 'effectif', array($etab['Effectif'], $etab[ if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); } //Effectif Etablissement -$element = formatElement('identite', 'effectifetab', array($etab['EffectifEtab'])); +$element = formatElement('identite', 'effectifetab', array($etab['EffectifEtab'], $etab['AnneeEffEt'])); if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); } ?> diff --git a/includes/scoresws/identite.php b/includes/scoresws/identite.php index 632b35631..a0b209372 100644 --- a/includes/scoresws/identite.php +++ b/includes/scoresws/identite.php @@ -729,12 +729,13 @@ function identite_effectif($effectif, $bilan, $AnneeEffEn = '') return array($lib, $data, $title); } -function identite_effectifetab($effectifEtab){ +function identite_effectifetab($effectifEtab, $AnneeEffEt){ if( isset($effectifEtab) && $effectifEtab!='N/C' && $effectifEtab!='NN' && $effectifEtab!=0 ){ $lib = 'Effectif de l\'établissement'; $title = ''; - $data =number_format($effectifEtab * 1, null, null, ' ').' salarié(s)'; + $data = number_format($effectifEtab * 1, null, null, ' ').' salarié(s)'; + $data.= empty($AnneeEffEt) || $AnneeEffEt=='0000' ? '' : ' en '.$AnneeEffEt; return array($lib, $data, $title); } else { return false; diff --git a/www/pages/etablissements.php b/www/pages/etablissements.php index b997bf48e..11993cb77 100644 --- a/www/pages/etablissements.php +++ b/www/pages/etablissements.php @@ -12,7 +12,7 @@ $etabs = scoresws_etablissements($siret, $siren, $idEntreprise); if ($etabs === false) { exit; } - +FB::log($etabs, 'etab'); $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale']; ?> @@ -41,7 +41,7 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale']; foreach ($etabs as $i => $etab) { if ($etab['Siege']==1) $type='siège '; - else $type='établissement '; + else $type='établ. '; if ($etab['Actif']==1) $type.='actif'; else $type.='inactif'; @@ -50,19 +50,44 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale']; $lien=''; ?> - - - + + + + + '') echo ''.$etab['Enseigne'].'
'; - echo $etab['Adresse'] .'
'; - if ($etab['Adresse2']<>'') echo $etab['Adresse2'].'
'; - echo ''.$etab['CP'].' '.$etab['Ville'].''; - if ($etab['Tel']<>'') echo '
Tél : '.$etab['Tel'].'   '; - if ($etab['Fax']<>'') echo '
Fax : '.$etab['Fax'].''; + if ($etab['Enseigne']!='') { + ?> +
+ +
+ +
+ + + Tél : '.$etab['Tel'].'   '; + if ($etab['Fax']!='') echo '
Fax : '.$etab['Fax'].''; ?> - + + + +
+ + Date: Wed, 11 Aug 2010 15:30:07 +0000 Subject: [PATCH 2/2] correction export xml, fixed issue #0000327 --- www/pages/etablissements.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/pages/etablissements.php b/www/pages/etablissements.php index 11993cb77..0421b2419 100644 --- a/www/pages/etablissements.php +++ b/www/pages/etablissements.php @@ -6,13 +6,11 @@ require_once 'partenaires/classMMap.php'; require_once 'common/dates.php'; require_once 'scoresws/scoresws.php'; -$mil = false; // ? - $etabs = scoresws_etablissements($siret, $siren, $idEntreprise); if ($etabs === false) { exit; } -FB::log($etabs, 'etab'); + $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale']; ?> @@ -131,6 +129,8 @@ function htmldecode($value){ } $tabForExport = htmldecode($etabs); //@TODO a tester +if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'etablissements-'.$idEntreprise; +}else{ $fileName = 'etablissements-'.$siret; } if(count($tabForExport)>0){ require_once 'export.php';