ws-2.0: un gros morceau en cours de test suite
This commit is contained in:
parent
5645081cdd
commit
401883461b
@ -78,18 +78,9 @@ function listeCmd($statut){
|
||||
|
||||
function codeTribunal($siren)
|
||||
{
|
||||
//Connection au webservice
|
||||
$client = new SoapClient(null, array(
|
||||
'trace' => 1,
|
||||
'soap_version' => SOAP_1_1,
|
||||
'location' => WEBSERVICE_URL,
|
||||
'uri' => WEBSERVICE_URI,
|
||||
'login' => 'mricois',
|
||||
'password' => 'bj10sx',
|
||||
));
|
||||
$O = $client->getIdentite($siren, '', false);
|
||||
$tribunalCode = $O['result']['TribunalCode'];
|
||||
return $tribunalCode;
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
return $etab->TribunalCode;
|
||||
}
|
||||
|
||||
function infoPaiement($codeTribunal, $type)
|
||||
|
@ -1,6 +1,62 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// class Annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
function afficheListeAnnonces(&$annonces, $siret, $idEntreprise)
|
||||
{
|
||||
if (count($annonces) > 0) {
|
||||
$objAnnonces = new Annonces($annonces->liste->item);
|
||||
$typeAnnonces =
|
||||
array('Bodacc' => 'EVÉNEMENTS LÉGAUX',
|
||||
'Balo' => 'BALO',
|
||||
'Bomp' => 'Marchés publics',
|
||||
'Asso' => 'Associations');
|
||||
|
||||
foreach ($typeAnnonces as $type => $titre) {
|
||||
$classType = 'annonces'.$type;
|
||||
if (count($objAnnonces->$classType) > 0) {
|
||||
print '<h2>'.$titre.'</h2>';
|
||||
print '<table>';
|
||||
foreach ($objAnnonces->$classType as $ann) {
|
||||
$resume = $objAnnonces->getAnnonceResume($ann);
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate">Le '.$resume['date'].
|
||||
' </span>';
|
||||
print '<span id="annoncesImg">'.$resume['logo'].'</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'&'.$resume['href'].'">';
|
||||
print $resume['lib'];
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Aucune annonce bodacc pour cette entreprise
|
||||
print '<h2>Evénements légaux</h2>';
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="100" class="StyleInfoLib"> </td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">'.
|
||||
'Néant</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td colspan="4"> </td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// class Annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
class Annonces
|
||||
{
|
||||
public $annoncesBodacc = array();
|
||||
@ -12,51 +68,19 @@ class Annonces
|
||||
|
||||
public function __construct($annonces = array())
|
||||
{
|
||||
if (is_array($annonces) && count($annonces)>0){
|
||||
if (is_array($annonces) && count($annonces) > 0) {
|
||||
$this->annonces = $annonces;
|
||||
$this->triAnnonces();
|
||||
}
|
||||
}
|
||||
|
||||
public function getAnnonceHead($ann)
|
||||
{
|
||||
if ($this->isBalo($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
elseif ($this->isAsso($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
}
|
||||
elseif ($this->isBomp($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
}
|
||||
elseif ($this->isBodacc($ann['BodaccCode']))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getAnnonceTexte($id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function getAnnonceResume($ann)
|
||||
{
|
||||
return array(
|
||||
'date' => $this->dateAnnonce($ann->DateParution),
|
||||
return
|
||||
array('date' => $this->dateAnnonce($ann->DateParution),
|
||||
'logo' => $this->logoAnnonce($ann),
|
||||
'href' => $this->hrefAnnonce($ann),
|
||||
'lib' => $this->libAnnonce($ann)
|
||||
);
|
||||
'lib' => $this->libAnnonce($ann));
|
||||
}
|
||||
|
||||
protected function hrefAnnonce($ann)
|
||||
@ -68,7 +92,7 @@ class Annonces
|
||||
$href = 'idan='.$ann->id.'&vue=balo';
|
||||
} else if ($this->isAsso($ann->BodaccCode)) {
|
||||
$href = 'idan='.$ann->id.'&vue=asso';
|
||||
} else if ($this->isBomp($ann->BodaccCode)){
|
||||
} else if ($this->isBomp($ann->BodaccCode)) {
|
||||
$href = 'idan='.$ann->id.'&vue=bomp';
|
||||
} else {
|
||||
$href = 'idan='.$ann->id.'&vue=bodacc';
|
||||
@ -88,14 +112,15 @@ class Annonces
|
||||
$title = '';
|
||||
if ($this->isBalo($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source BALO n°'.$ann->BodaccNum;
|
||||
$title = 'Source BALO n°'.$ann->BodaccNum;
|
||||
} else if ($this->isAsso($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
$title = 'Source JO ASSOCIATION n°'.$ann['BodaccNum'];
|
||||
$title = 'Source JO ASSOCIATION n°'.$ann['BodaccNum'];
|
||||
} else if ($this->isBomp($ann->BodaccCode)) {
|
||||
$src = './img/logo_jo.png';
|
||||
if ($ann->BodaccCode == 'MAPA') {
|
||||
$title = 'Source '.$ann->BodaccCode.' '.intval($ann->BodaccNum);
|
||||
$title = 'Source '.$ann->BodaccCode.' '.
|
||||
intval($ann->BodaccNum);
|
||||
} else {
|
||||
$title = 'Source '.$ann->BodaccCode.' '.
|
||||
'n°'.intval($ann->BodaccNum).' de '.
|
||||
@ -132,6 +157,7 @@ class Annonces
|
||||
|
||||
protected function libAnnonce($ann)
|
||||
{
|
||||
$wdate = new WDate;
|
||||
$lib = '';
|
||||
foreach ($ann->evenements->item as $even) {
|
||||
$lib .= $even->LibEven;
|
||||
@ -139,8 +165,7 @@ class Annonces
|
||||
$source = $tabSource[0];
|
||||
$numEven = intval($even->CodeEven);
|
||||
if ($numEven > 3000 && $numEven < 3999) {
|
||||
if (isset($ann->dateEffet)){
|
||||
$wdate = new WDate;
|
||||
if (isset($ann->dateEffet)) {
|
||||
$lib .= ' (clôture au '.
|
||||
$wdate->dateT('Y-m-d','d/m/Y', $ann->dateEffet).')';
|
||||
}
|
||||
@ -162,7 +187,7 @@ class Annonces
|
||||
$this->annoncesBalo[] = $ann;
|
||||
} elseif ($this->isAsso($ann->BodaccCode)) {
|
||||
$this->annoncesAsso[] = $ann;
|
||||
} elseif ($this->isBomp($ann->BodaccCode)){
|
||||
} elseif ($this->isBomp($ann->BodaccCode)) {
|
||||
$this->annoncesBomp[] = $ann;
|
||||
} else {
|
||||
$this->annoncesBodacc[] = $ann;
|
||||
@ -172,38 +197,21 @@ class Annonces
|
||||
|
||||
protected function isBodacc($code)
|
||||
{
|
||||
if (in_array($code, array('BODA', 'BODB', 'BODC'))){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return in_array($code, array('BODA', 'BODB', 'BODC'));
|
||||
}
|
||||
|
||||
protected function isBalo($code)
|
||||
{
|
||||
if ($code == 'BALO'){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return ($code == 'BALO');
|
||||
}
|
||||
|
||||
protected function isAsso($code)
|
||||
{
|
||||
if ($code == 'ASSO'){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return ($code == 'ASSO');
|
||||
}
|
||||
|
||||
protected function isBomp($code)
|
||||
{
|
||||
if (in_array($code, array('BOMP A', 'BOMP B', 'BOMP C', 'MAPA'))){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
return in_array($code, array('BOMP A', 'BOMP B', 'BOMP C', 'MAPA'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +1,18 @@
|
||||
<?php
|
||||
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
|
||||
$q = (isset($_REQUEST['q']) == true) ? $_REQUEST['q'] : '';
|
||||
$params = explode('/', $q);
|
||||
$action = $params[0];
|
||||
|
||||
switch ( $action ) {
|
||||
case 'rs':
|
||||
try {
|
||||
$O = $client->getIdentite($_REQUEST['siren'], 0, false);
|
||||
echo $O['result']['Nom'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
switch ($action) {
|
||||
case 'rs':
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($_REQUEST['siren'], $_REQUEST['siren'], 0);
|
||||
print $etab->Nom;
|
||||
break;
|
||||
case 'comment':
|
||||
//Enregistrement du commentaire
|
||||
if ( isset($_REQUEST['submit']) && $_REQUEST['submit']=='comment' ){
|
||||
case 'comment':
|
||||
// Enregistrement du commentaire
|
||||
if (isset($_REQUEST['submit']) == true &&
|
||||
$_REQUEST['submit'] == 'comment') {
|
||||
require_once 'dbbootstrap.php';
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
@ -23,19 +20,20 @@ switch ( $action ) {
|
||||
->set('statutCommande', '?', $_REQUEST['statutCommande'])
|
||||
->set('commentaire', '?', $_REQUEST['commentaire'])
|
||||
->where('idCommande = ?', $_REQUEST['idCommande']);
|
||||
//echo $q->getSql();
|
||||
//print $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
print $q->execute();
|
||||
} else {
|
||||
?>
|
||||
<form name="formComment" id="formComment" action="/?page=greffescmd&q=comment" method="post">
|
||||
<span id="message"></span><br/>
|
||||
<input type="hidden" name="idCommande" value="<?=$_REQUEST['id']?>"/>
|
||||
<input type="hidden" name="statutCommande" value="<?=$_REQUEST['erreur']?>"/>
|
||||
Commentaire sur la commande G<?=$_REQUEST['id']?><br/>
|
||||
<textarea name="commentaire" cols="40" rows="3"></textarea>
|
||||
</form>
|
||||
<?php
|
||||
print '<form name="formComment" id="formComment"'.
|
||||
' action="/?page=greffescmd&q=comment" method="post">';
|
||||
print '<span id="message"></span><br/>';
|
||||
print '<input type="hidden" name="idCommande"'.
|
||||
' value="'.$_REQUEST['id'].'"/>';
|
||||
print '<input type="hidden" name="statutCommande"'.
|
||||
' value="'.$_REQUEST['erreur'].'"/>';
|
||||
print 'Commentaire sur la commande G'.$_REQUEST['id'].'<br/>';
|
||||
print '<textarea name="commentaire" cols="40" rows="3"></textarea>';
|
||||
print '</form>';
|
||||
}
|
||||
break;
|
||||
}
|
@ -63,6 +63,7 @@ if (isset($etab->Isin) == true) {
|
||||
|
||||
// Ne pas afficher le logo si il n'existe pas OU
|
||||
// si le siren est à 0 OU si le siren est inférieur a 100
|
||||
require_once 'logos/logos.php';
|
||||
list($urlImg, $pathImg) = logo_exist($etab->Siren, $etab->Isin, $etab->Web);
|
||||
if ((($siren * 1 != 0) || ($siren * 1 > 100)) && file_exists($pathImg)) {
|
||||
$tabTmp = @getimagesize($pathImg);
|
||||
|
@ -3,11 +3,11 @@
|
||||
// News
|
||||
if (hasPref('news')) {
|
||||
/* Information presse 15 Aug 2007 09:21:49 GMT - */
|
||||
require_once ('XML/RSS.php');
|
||||
@require_once 'XML/RSS.php';
|
||||
$url = 'http://news.google.fr/news?hl=fr&ned=fr&q='.
|
||||
urlencode('"'.$etab->Nom.'"').'&output=rss';
|
||||
$firephp->log($url, 'url');
|
||||
$rss = new XML_RSS($url);
|
||||
$rss = @new XML_RSS($url);
|
||||
$rss->parse();
|
||||
$tabMonth = array('Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4,
|
||||
'May' => 5, 'Jun' => 6, 'Jul' => 7, 'Aug' => 8,
|
||||
|
@ -52,14 +52,14 @@ if ($typeCommande == 'C') {
|
||||
$typeDocument = 'kbis';
|
||||
}
|
||||
|
||||
require_once 'scoresws/scoresws.php';
|
||||
// Identite
|
||||
$siren = $commande->siren;
|
||||
$O = $client->getIdentite($siren, '', false);
|
||||
$etab = $O['result'];
|
||||
$commune = $etab['codeCommune'];
|
||||
$dept = $etab['Dept'];
|
||||
$siret = $etab['Siret'];
|
||||
$numRC = $etab['NumRC'];
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
$commune = $etab->codeCommune;
|
||||
$dept = $etab->Dept;
|
||||
$siret = $etab->Siret;
|
||||
$numRC = $etab->NumRC;
|
||||
|
||||
// Adresse du tribunal de commerce
|
||||
$O = $client->getListeCompetences($siret, 'tri', $dept.$commune);
|
||||
@ -77,13 +77,13 @@ $info->siren =
|
||||
substr($siren, 0, 3).' '.
|
||||
substr($siren, 3, 3).' '.
|
||||
substr($siren, 6, 3);
|
||||
$info->nom = $etab['Nom'];
|
||||
$info->nom = $etab->Nom;
|
||||
$info->libTrib = $libTrib;
|
||||
$info->adresse = $etab['Adresse'].' ';
|
||||
if (empty($etab['Adresse2']) == false) {
|
||||
$info->adresse .= $etab['Adresse2'].' ';
|
||||
$info->adresse = $etab->Adresse.' ';
|
||||
if (empty($etab->Adresse2) == false) {
|
||||
$info->adresse .= $etab->Adresse2.' ';
|
||||
}
|
||||
$info->adresse .= "\n".$etab['CP'].' '.$etab['Ville'];
|
||||
$info->adresse .= "\n".$etab->CP.' '.$etab->Ville;
|
||||
$info->tribunal = $competence;
|
||||
|
||||
// Prix
|
||||
|
@ -1,39 +1,38 @@
|
||||
<?php
|
||||
|
||||
function htmlentitydecode_deep($value)
|
||||
{
|
||||
$value = is_array($value) ?
|
||||
array_map('htmlentitydecode_deep', $value) :
|
||||
html_entity_decode($value, ENT_QUOTES);
|
||||
return $value;
|
||||
if (is_object($value) == true) {
|
||||
$obj = new StdClass;
|
||||
foreach ($value as $l => $v) {
|
||||
$obj->$l = htmlentitydecode_deep($v);
|
||||
}
|
||||
return $obj;
|
||||
} else if (is_array($value) == true) {
|
||||
return array_map('htmlentitydecode_deep', $value);
|
||||
} else {
|
||||
return html_entity_decode($value, ENT_QUOTES);
|
||||
}
|
||||
}
|
||||
|
||||
$siren = isset($_REQUEST['siren'])? trim($_REQUEST['siren']) : '';
|
||||
$siren = str_replace(' ','',$siren); //Remplacer les espaces
|
||||
$siren = isset($_REQUEST['siren']) ? trim($_REQUEST['siren']) : '';
|
||||
$siren = str_replace(' ', '', $siren);
|
||||
|
||||
if ( $siren=='' || strlen($siren)!=14 ) {
|
||||
$output = array(
|
||||
'Siret' => 'Siret incorrect',
|
||||
);
|
||||
echo json_encode($output);
|
||||
if ($siren == '' || strlen($siren) != 14) {
|
||||
print json_encode(array('Siret' => 'Siret incorrect'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$tabEntrep=array();
|
||||
try {
|
||||
$O = $client->getIdentite($siren);
|
||||
$tabEntrep=$O['result'];
|
||||
} catch (SoapFault $fault) {}
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siren, $siren, 0);
|
||||
|
||||
/**
|
||||
* Utiliser la raison sociale la plus longue
|
||||
* Nom, Nom2, NomLong
|
||||
*/
|
||||
if (!empty($tabEntrep['NomLong']) &&
|
||||
strlen($tabEntrep['NomLong'])>strlen($tabEntrep['Nom'])){
|
||||
$tabEntrep['Nom'] = $tabEntrep['NomLong'];
|
||||
if (empty($etab->NomLong) == false &&
|
||||
strlen($etab->NomLong) > strlen($etab->Nom)){
|
||||
$etab->Nom = $etab->NomLong;
|
||||
}
|
||||
|
||||
//Retourner le tableau sous forme json
|
||||
$tabEntrepD = htmlentitydecode_deep($tabEntrep);
|
||||
echo json_encode($tabEntrepD);
|
||||
// Retourner le tableau sous forme json
|
||||
print json_encode(htmlentitydecode_deep($etab));
|
||||
|
@ -7,8 +7,18 @@ $action = $params[0];
|
||||
switch ( $action ) {
|
||||
//Retourne les informations adresses de l'établissement
|
||||
case 'etabnic':
|
||||
$siret = isset($params[1]) ? $params[1] : '' ;
|
||||
require_once realpath(dirname(__FILE__)).'/saisie_etabnic.php';
|
||||
if (isset($params[1]) == true) {
|
||||
$siret = $params[1];
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), 0);
|
||||
if ($etab->Siret == $siret) {
|
||||
print
|
||||
$etab->Adresse.' '.
|
||||
$etab->CP.' '.
|
||||
$etab->Ville.' ('.
|
||||
$etab->Nic.')';
|
||||
}
|
||||
}
|
||||
break;
|
||||
//Retourne le formulaire opposition insee
|
||||
case 'oppositioninsee':
|
||||
@ -110,14 +120,11 @@ switch ( $action ) {
|
||||
//echo $q->getSql();
|
||||
//print_r($q->getFlattenedParams());
|
||||
echo $rows = $q->execute();
|
||||
} elseif ($params[1]=='rs') {
|
||||
try {
|
||||
$O = $client->getIdentite($_REQUEST['siren'], 0, false);
|
||||
echo $O['result']['Nom'];
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
}
|
||||
} else if ($params[1] == 'rs') {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($_REQUEST['siren'],
|
||||
$_REQUEST['siren'], 0);
|
||||
print $etab->Nom;
|
||||
}
|
||||
break;
|
||||
//Gestion des logos
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
if($siret!='')
|
||||
{
|
||||
$O = $client->getIdentite($siret, 0, false);
|
||||
$etab = $O['result'];
|
||||
FB::log($etab,'etab');
|
||||
if($etab['Siret']==$siret)
|
||||
{
|
||||
echo $etab['Adresse'].' '.
|
||||
$etab['CP'].' '.
|
||||
$etab['Ville'].' ('. $etab['Nic'].')';
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
300
includes/scoresws/indiscore.php
Normal file
300
includes/scoresws/indiscore.php
Normal file
@ -0,0 +1,300 @@
|
||||
<?php
|
||||
function formatPct($pct)
|
||||
{
|
||||
$pct = round($pct / 10, 0) * 10;
|
||||
if ($pct == 0) {
|
||||
$pct = 10;
|
||||
}
|
||||
return $pct;
|
||||
}
|
||||
|
||||
function afficheEvaluation($titre, $champ, $image)
|
||||
{
|
||||
print '<h3><u>'.$titre.' :</u></h3>';
|
||||
print '<div class="stats gradiant_pic">';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<i>'.$etab[$champ].'</i>';
|
||||
print '<div class="blocdegrade clearfix">';
|
||||
print '<span class="textdegrade">'.$titre.'</span>';
|
||||
print '<div class="imgdegrade">';
|
||||
print '<img class="borderimg" src="./img/indiscore/imgscores-'.
|
||||
formatPct($etab[$image]).'.png"/>';
|
||||
print '</div>';
|
||||
print '<div class="regle"><img src="./img/sgradiant2.png" /></div>';
|
||||
print '</div>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||||
print '<pre>c';
|
||||
print_r($etab);
|
||||
print 'c</pre>';
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">INDISCORE©</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siret du siège</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' '.
|
||||
substr($etab->Siret, -5);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($etab->NumRC) == true && $etab->NumRC != 0) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->NumRC?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Raison sociale & coordonnées</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->Nom;
|
||||
if (isset($etab->Nom2) == true && $etab->Nom2 != '') {
|
||||
print '<br/>'.$etab->Nom2;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($etab->Enseigne != '' && $etab->Sigle != '') {
|
||||
$titre = 'Enseigne / Sigle';
|
||||
$lib = $etab->Enseigne.' / '.$etab->Sigle;
|
||||
} else if ($etab->Enseigne != '' && $etab->Sigle == '') {
|
||||
$titre = 'Enseigne';
|
||||
$lib = $etab->Enseigne;
|
||||
} else if ($etab->Enseigne == '' && $etab->Sigle != '') {
|
||||
$titre = 'Sigle';
|
||||
$lib = $etab->Sigle;
|
||||
} else {
|
||||
$titre = '';
|
||||
}
|
||||
if ($titre != '') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->FJ_lib; //@todo INSEE //.' ('.$etab->FJ
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Date de création de l'entreprise</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
$dateCreation = str_replace('-', '', $etab->DateCreaEn);
|
||||
$date = new WDate;
|
||||
print $date->dateT('Ymd', 'm/Y', $dateCreation);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Adresse?><br/>
|
||||
<?php
|
||||
if ($etab->Adresse2 != '') {
|
||||
print $etab->Adresse2.'<br/>';
|
||||
}
|
||||
print $etab->CP.' '.$etab->Ville;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Tel?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?php
|
||||
require_once 'surveillance/surveillance.php';
|
||||
print getSurveillance('score', $siret);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
L'évaluation indiScore© est en partie basée
|
||||
sur les points notables suivants :<br/>
|
||||
<?php
|
||||
afficheEvaluation('Conformité légale',
|
||||
'AnalyseConfor', 'ScoreConfor');
|
||||
afficheEvaluation('Dirigeance',
|
||||
'AnalyseDirigeance', 'ScoreDirigeance');
|
||||
afficheEvaluation('Solvabilité',
|
||||
'AnalyseSolvabilite', 'Indiscore');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$millesimeMax =
|
||||
date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y') - 2));
|
||||
if ($etab->NbBilansScore > 0 &&
|
||||
$etab->Bilans[0]['Millesime'] >= $millesimeMax) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'A la lecture du dernier bilan, la situation financière de'.
|
||||
'l'entreprise '.$etab->Nom.' est <b>'.
|
||||
$etab->tabInfosNotations['SituationFinanciere'].'</b>.<br/>';
|
||||
print '<!-- Cette notation financière est '.
|
||||
$etab->tabInfosNotations['Notation'].'.<br/>-->';
|
||||
if (html_entity_decode($etab->tabInfosNotations['ProbabiliteDefaut']) !=
|
||||
'En défaut') {
|
||||
print 'La probabilité de défaillance associée'.
|
||||
' à cette note avoisine les '.
|
||||
number_format($etab->tabInfosNotations['ProbabiliteDefaut'],
|
||||
3, ',', ' ').' %';
|
||||
} else {
|
||||
print 'Cette entreprise est défaillante'.
|
||||
' ou sur le point de le devenir.';
|
||||
}
|
||||
// [EquivalenceBDF]
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print '<i>Pour information, les méthodes standards donnent :'.
|
||||
' Conan & Holder = <b>'.$etab->scores['ConanH'].
|
||||
'</b>, Afdcc2 = <b>'.$etab->scores['Afdcc2'].
|
||||
'</b> et Score Z = <b>'.$etab->scores['Z'].'</b>.</i>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'La situation financière de l\'entreprise ne peut être'.
|
||||
' évaluée en détail car ';
|
||||
if ($etab->Bilans[0]['Millesime'] < $millesimeMax &&
|
||||
count($etab->Bilans) > 0) {
|
||||
print 'le dernier bilan disponible date de '.
|
||||
substr($etab->Bilans[0]['Millesime'], 0, 4).'.';
|
||||
} else {
|
||||
print 'aucun bilan n\'est disponible.';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?=html_entity_decode($etab->infoPaiement)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Compte tenu des informations disponibles auprès des sources
|
||||
officielles Scores et Décisions présente la conclusion
|
||||
suivante :<br/>
|
||||
<?php
|
||||
switch ($_SESSION['tabInfo']['typeScore']) {
|
||||
case '20':
|
||||
$maxIndiscore = $_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore20;
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore =
|
||||
(empty($_SESSION['tabInfo']['typeScore']) == true) ? '100' :
|
||||
$_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore;
|
||||
break;
|
||||
}
|
||||
print '<h3>LE SCORE EST DE '.$indiscore.
|
||||
' SUR '.$maxIndiscore.' POINTS</h3>';
|
||||
if ($etab->infoEncours != '' &&
|
||||
is_numeric($etab->encours) == false &&
|
||||
$etab->encours == 'N/A') {
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
} else {
|
||||
if ($indiscore != 0) {
|
||||
print '<i>La tendance de la note est '.
|
||||
$etab->TendanceIndiscore.'</i>';
|
||||
print '<h3>L\'ENCOURS MAXIMUM CONSEILLÉ EST DE '.
|
||||
round($etab->encours / 1000).' K€</h3>';
|
||||
}
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
<img src="./img/logo_indiscore.png"/></td>
|
||||
</tr>
|
||||
</table>
|
@ -2,7 +2,8 @@
|
||||
require_once 'cache/cache.php';
|
||||
require_once realpath(dirname(__FILE__)).'/functions.php';
|
||||
|
||||
$ws_soap_client =
|
||||
global $ws_soap_client_ent;
|
||||
$ws_soap_client_ent =
|
||||
new SoapClient('http://webservice.sd.lan/service?wsdl-auto',
|
||||
array('login' => 'sbeaugrand',
|
||||
'password' => 'seb2010',
|
||||
@ -16,7 +17,7 @@ $ws_soap_client =
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_identite($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'identite-'.$idEntreprise;
|
||||
@ -35,14 +36,14 @@ function scoresws_identite($siret, $siren, $idEntreprise)
|
||||
$o->id = $idEntreprise;
|
||||
//$o->forceVerif
|
||||
|
||||
$O = $ws_soap_client->__call('getIdentite', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getIdentite', array($o));
|
||||
|
||||
$return = $O->getIdentiteResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -54,7 +55,7 @@ function scoresws_identite($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_identitelight($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'identitelight-'.$idEntreprise;
|
||||
@ -73,14 +74,14 @@ function scoresws_identitelight($siret, $siren, $idEntreprise)
|
||||
$o->id = $idEntreprise;
|
||||
//$o->forceVerif
|
||||
|
||||
$O = $ws_soap_client->__call('getIdentiteLight', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getIdentiteLight', array($o));
|
||||
|
||||
$return = $O->getIdentiteLightResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -92,7 +93,7 @@ function scoresws_identitelight($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_identite_ags($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'identiteags-'.$idEntreprise;
|
||||
@ -110,14 +111,14 @@ function scoresws_identite_ags($siret, $siren, $idEntreprise)
|
||||
$o->siret = $siret;
|
||||
$o->id = $idEntreprise;
|
||||
|
||||
$O = $ws_soap_client->__call('getIdentiteAGS', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getIdentiteAGS', array($o));
|
||||
|
||||
$return = $O->getIdentiteAGSResult->result;
|
||||
cache_delete();
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -127,9 +128,10 @@ function scoresws_identite_ags($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
// scoresws_annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan)
|
||||
function scoresws_annonces($siret, $siren, $idEntreprise,
|
||||
$vue = '', $idan = false)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'annonces-'.$idEntreprise;
|
||||
@ -161,14 +163,14 @@ function scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan)
|
||||
//$o->position = ;
|
||||
//$o->nbRep = ;
|
||||
|
||||
$O = $ws_soap_client->__call('getAnnonces', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getAnnonces', array($o));
|
||||
|
||||
$return = $O->getAnnoncesResult->result;
|
||||
cache_delete();
|
||||
cache_add('annonces', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -180,7 +182,7 @@ function scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_infosreg($siret, $siren, $idEntreprise, $idCom)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'infosreg-'.$idEntreprise;
|
||||
@ -197,14 +199,14 @@ function scoresws_infosreg($siret, $siren, $idEntreprise, $idCom)
|
||||
$o->siren = $siren;
|
||||
$o->id = $idCom;
|
||||
|
||||
$O = $ws_soap_client->__call('getInfosReg', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getInfosReg', array($o));
|
||||
|
||||
$return = $O->getInfosRegResult->result;
|
||||
cache_delete();
|
||||
cache_add('annonces', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -216,9 +218,7 @@ function scoresws_infosreg($siret, $siren, $idEntreprise, $idCom)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_ratios($siret, $siren, $idEntreprise, $page = 'ratios')
|
||||
{
|
||||
global $ws_soap_client;
|
||||
|
||||
//global $page;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
$fileName = 'ratios-';
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
@ -253,7 +253,7 @@ function scoresws_ratios($siret, $siren, $idEntreprise, $page = 'ratios')
|
||||
$o->siret = $siret;
|
||||
$o->page = $page;
|
||||
|
||||
$O = $ws_soap_client->__call('getRatios', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getRatios', array($o));
|
||||
|
||||
$result = $O->getRatiosResult->result;
|
||||
|
||||
@ -296,7 +296,7 @@ function scoresws_ratios($siret, $siren, $idEntreprise, $page = 'ratios')
|
||||
'dataSIG' => $dataSIG);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -308,7 +308,7 @@ function scoresws_ratios($siret, $siren, $idEntreprise, $page = 'ratios')
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'liasse-'.$idEntreprise;
|
||||
@ -330,7 +330,7 @@ function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
|
||||
$O = $ws_soap_client->__call('getListeBilans', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getListeBilans', array($o));
|
||||
|
||||
$tabBilans = $O->getListeBilansResult->result;
|
||||
// Tri du tableau
|
||||
@ -350,7 +350,7 @@ function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
$o->typeBilan = substr($mil[0], 0, 1);
|
||||
$o->ref = $mil[1];
|
||||
|
||||
$O = $ws_soap_client->__call('getBilan', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getBilan', array($o));
|
||||
|
||||
$tabBilan = $O->getBilanResult->result;
|
||||
cache_add('tabBilan', $tabBilan);
|
||||
@ -360,7 +360,7 @@ function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -371,7 +371,7 @@ function scoresws_listeBilans($siret, $siren, $idEntreprise, $mil)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_indiscore($siret, $siren, $idEntreprise, $niveau = 2)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'indiscore-'.$idEntreprise.'-'.$niveau;
|
||||
@ -390,7 +390,7 @@ function scoresws_indiscore($siret, $siren, $idEntreprise, $niveau = 2)
|
||||
//$o->accesDist
|
||||
$o->niveau = $niveau;
|
||||
|
||||
$O = $ws_soap_client->__call('getIndiScore', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getIndiScore', array($o));
|
||||
|
||||
print '<pre>s';
|
||||
print_r($O);
|
||||
@ -400,7 +400,7 @@ print 's</pre>';
|
||||
cache_add('etab', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -412,7 +412,7 @@ print 's</pre>';
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_evenements($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'evenements-'.$idEntreprise;
|
||||
@ -431,14 +431,17 @@ function scoresws_evenements($siret, $siren, $idEntreprise)
|
||||
//$o->deb
|
||||
//$o->max
|
||||
|
||||
$O = $ws_soap_client->__call('getListeEvenements', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getListeEvenements', array($o));
|
||||
print '<pre>';
|
||||
print_r($O);
|
||||
print '</pre>';
|
||||
|
||||
$return = $O->getListeEvenementsResult->result;
|
||||
cache_delete();
|
||||
cache_add('evens', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -450,7 +453,7 @@ function scoresws_evenements($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_dirigeants($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 && $siren < 100) {
|
||||
$fileName = 'dirigeants-'.$idEntreprise;
|
||||
@ -472,14 +475,14 @@ function scoresws_dirigeants($siret, $siren, $idEntreprise)
|
||||
$o->siren = $siren;
|
||||
$o->histo = $histo;
|
||||
|
||||
$O = $ws_soap_client->__call('getDirigeants', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getDirigeants', array($o));
|
||||
|
||||
$return = $O->getDirigeantsResult->result;
|
||||
cache_delete();
|
||||
cache_add('dirs', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -491,7 +494,7 @@ function scoresws_dirigeants($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_liens($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'liens-'.$idEntreprise;
|
||||
@ -508,14 +511,14 @@ function scoresws_liens($siret, $siren, $idEntreprise)
|
||||
$o->siren = $siren;
|
||||
$o->actifsUniquement = true;
|
||||
|
||||
$O = $ws_soap_client->__call('getLiens', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getLiens', array($o));
|
||||
|
||||
$return = $O->getLiensResult->result;
|
||||
cache_delete();
|
||||
cache_add('liens', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -527,7 +530,7 @@ function scoresws_liens($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_banques($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'banque-'.$idEntreprise;
|
||||
@ -545,14 +548,14 @@ function scoresws_banques($siret, $siren, $idEntreprise)
|
||||
$o->siren = $siren;
|
||||
$o->id = $idEntreprise;
|
||||
|
||||
$O = $ws_soap_client->__call('getBanques', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getBanques', array($o));
|
||||
|
||||
$return = $O->getBanquesResult->result;
|
||||
cache_delete();
|
||||
cache_add('rbanque', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -564,7 +567,7 @@ function scoresws_banques($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scoresws_etablissements($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'etablissements-'.$idEntreprise;
|
||||
@ -585,14 +588,15 @@ function scoresws_etablissements($siret, $siren, $idEntreprise)
|
||||
//$o->position
|
||||
//$o->nbRep
|
||||
|
||||
$O = $ws_soap_client->__call('getListeEtablissements', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getListeEtablissements',
|
||||
array($o));
|
||||
|
||||
$return = $O->getListeEtablissementsResult->result;
|
||||
cache_delete();
|
||||
cache_add('etabs', $return);
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
@ -604,7 +608,7 @@ function scoresws_etablissements($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_privileges($siret, $siren, $detail, $vue)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
$fileName = 'privileges-'.$siret;
|
||||
if (empty($vue) == false) {
|
||||
@ -623,7 +627,7 @@ function scorews_privileges($siret, $siren, $detail, $vue)
|
||||
$o->detail = $detail;
|
||||
$o->vue = $vue;
|
||||
|
||||
$O = $ws_soap_client->__call('getPrivileges', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getPrivileges', array($o));
|
||||
|
||||
$return = $O->getPrivilegesResult->result;
|
||||
cache_delete();
|
||||
@ -631,7 +635,7 @@ function scorews_privileges($siret, $siren, $detail, $vue)
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -641,7 +645,7 @@ function scorews_privileges($siret, $siren, $detail, $vue)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_bourse($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'bourse-'.$idEntreprise;
|
||||
@ -658,7 +662,7 @@ function scorews_bourse($siret, $siren, $idEntreprise)
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
|
||||
$O = $ws_soap_client->__call('getInfosBourse', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getInfosBourse', array($o));
|
||||
|
||||
$return = $O->getInfosBourseResult->result;
|
||||
|
||||
@ -667,7 +671,7 @@ function scorews_bourse($siret, $siren, $idEntreprise)
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -677,7 +681,7 @@ function scorews_bourse($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_competences($siret, $siren, $idEntreprise, $type, $codeComm)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'competences-'.$idEntreprise;
|
||||
@ -699,7 +703,7 @@ function scorews_competences($siret, $siren, $idEntreprise, $type, $codeComm)
|
||||
$o->type = $type;
|
||||
$o->comm = $codeComm;
|
||||
|
||||
$O = $ws_soap_client->__call('getListeCompetences', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getListeCompetences', array($o));
|
||||
|
||||
$return = $O->getListeCompetencesResult->result;
|
||||
|
||||
@ -708,7 +712,7 @@ function scorews_competences($siret, $siren, $idEntreprise, $type, $codeComm)
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -718,7 +722,7 @@ function scorews_competences($siret, $siren, $idEntreprise, $type, $codeComm)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_conventions($siret, $siren, $idEntreprise)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
if ($siret == 0 || $siren < 100) {
|
||||
$fileName = 'conventions-'.$idEntreprise;
|
||||
@ -735,7 +739,7 @@ function scorews_conventions($siret, $siren, $idEntreprise)
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
|
||||
$O = $ws_soap_client->__call('getListeConventions', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getListeConventions', array($o));
|
||||
|
||||
$return = $O->getListeConventionsResult->result;
|
||||
|
||||
@ -744,7 +748,7 @@ function scorews_conventions($siret, $siren, $idEntreprise)
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
@ -754,7 +758,7 @@ function scorews_conventions($siret, $siren, $idEntreprise)
|
||||
// -------------------------------------------------------------------------- //
|
||||
function scorews_marques($siret, $siren, $idEntreprise, $id)
|
||||
{
|
||||
global $ws_soap_client;
|
||||
global $ws_soap_client_ent;
|
||||
|
||||
$label = 'marques';
|
||||
|
||||
@ -776,7 +780,7 @@ function scorews_marques($siret, $siren, $idEntreprise, $id)
|
||||
$o = new StdClass;
|
||||
$o->siren = $siren;
|
||||
|
||||
$O = $ws_soap_client->__call('getMarques', array($o));
|
||||
$O = $ws_soap_client_ent->__call('getMarques', array($o));
|
||||
|
||||
$return = $O->getMarquesResult->result;
|
||||
|
||||
@ -785,7 +789,7 @@ function scorews_marques($siret, $siren, $idEntreprise, $id)
|
||||
return $return;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($ws_soap_client, $fault, $_SESSION['tabInfo']);
|
||||
processSoapFault($ws_soap_client_ent, $fault, $_SESSION['tabInfo']);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
@ -38,45 +38,68 @@ function redimage($img_src,$dst_w,$dst_h) {
|
||||
return "width=".$dst_w." height=".$dst_h;
|
||||
}
|
||||
|
||||
function etabSession($siret, $idEntreprise = 0){
|
||||
/**
|
||||
* Retourne la raison sociale de la session / du webservice
|
||||
* @param string $siret
|
||||
* @param int $idEntreprise
|
||||
* @return string
|
||||
*/
|
||||
function etabSession($siret, $idEntreprise = 0)
|
||||
{
|
||||
global $client;
|
||||
if ( ($siret!=false || $idEntreprise!=false) &&
|
||||
(isset($_SESSION['tabInfo']['entrep'])==false ||
|
||||
$siret!=$_SESSION['tabInfo']['entrep']['siret'] ||
|
||||
($siret*1==0 && $idEntreprise!=$_SESSION['tabInfo']['entrep']['id']))
|
||||
)
|
||||
{
|
||||
FB::info('getIdentite');
|
||||
$O2 = $client->getIdentite($siret, $idEntreprise, false);
|
||||
$etab = $O2['result'];
|
||||
$compare = false;
|
||||
// Comparaison Siren / Siret
|
||||
if (isset($_SESSION['tabInfo']['entrep']) &&
|
||||
empty($siret) == false && $siret != 0) {
|
||||
if (strlen($siret) == 9) {
|
||||
// Comparaison entre siren
|
||||
if ($siret == $_SESSION['tabInfo']['entrep']['siren']) {
|
||||
$compare = true;
|
||||
}
|
||||
} else if (strlen($siret) == 14) {
|
||||
// Comparaison entre siret
|
||||
if ($siret == $_SESSION['tabInfo']['entrep']['siret']) {
|
||||
$compare = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Comparaison id
|
||||
if (isset($_SESSION['tabInfo']['entrep']) &&
|
||||
empty($siret) == true && $siret == 0) {
|
||||
if ($idEntreprise != 0 &&
|
||||
$idEntreprise == $_SESSION['tabInfo']['entrep']['id']) {
|
||||
$compare = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($compare == false) {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), $idEntreprise);
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||
$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'];
|
||||
$tabEntrep['active'] = array_key_exists('Statut',$etab)? $etab['Statut'] : '';
|
||||
$tabEntrep['Source'] = $etab['Source'];
|
||||
$tabEntrep['SourceId'] = $etab['SourceId'];
|
||||
$tabEntrep['codeCommune'] = $etab['Dept'].$etab['codeCommune'];
|
||||
$tabEntrep['nafEn'] = $etab['NafEnt'];
|
||||
$tabEntrep['nafEt'] = $etab['NafEtab'];
|
||||
$tabEntrep['fj'] = $etab['FJ'];
|
||||
$tabEntrep['raisonSociale'] = $etab->Nom;
|
||||
$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;
|
||||
$tabEntrep['active'] =
|
||||
(isset($etab->Statut) == true) ? $etab->Statut : '';
|
||||
$tabEntrep['Source'] = $etab->Source;
|
||||
$tabEntrep['SourceId'] = $etab->SourceId;
|
||||
$tabEntrep['codeCommune'] = $etab->Dept.$etab->codeCommune;
|
||||
$tabEntrep['nafEn'] = $etab->NafEnt;
|
||||
$tabEntrep['nafEt'] = $etab->NafEtab;
|
||||
$tabEntrep['fj'] = $etab->FJ;
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
$raisonSociale = $etab['Nom'];
|
||||
return $etab->Nom;
|
||||
} else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale'])) {
|
||||
return $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
else if (isset($_SESSION['tabInfo']['entrep']['raisonSociale']) == true)
|
||||
{
|
||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$raisonSociale = '';
|
||||
}
|
||||
return $raisonSociale;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
@ -3,19 +3,15 @@ if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
require_once 'annonces/annonces.php';
|
||||
require_once 'common/dates.php';
|
||||
$wdate = new WDate;
|
||||
|
||||
$idan = (isset($_REQUEST['idan']) == true) ? $_REQUEST['idan'] : false;
|
||||
$vue = (isset($_GET['vue']) == true) ? $_GET['vue'] : '';
|
||||
|
||||
// Récupération des infos du webservice
|
||||
$annonces = scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan);
|
||||
$objAnnonces = new Annonces($annonces->liste->item);
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
@ -50,11 +46,10 @@ $objAnnonces = new Annonces($annonces->liste->item);
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$wdate = new WDate;
|
||||
if ($idan && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp'))) {
|
||||
// Présélection des annonces
|
||||
foreach ($annonces as $ann) {
|
||||
if ($ann['id'] == $idan) {
|
||||
foreach ($annonces->liste->item as $ann) {
|
||||
if ($ann->id == $idan) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -69,19 +64,19 @@ if ($vue == 'balo') {
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'BALO n°'.$ann['BodaccNum'].
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'Entré n°'.$ann['NumAnnonce'].
|
||||
print 'BALO n°'.$ann->BodaccNum.
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'Entré n°'.$ann->NumAnnonce.
|
||||
'Entrée en base S&D : '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['dateInsertionSD']);
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD);
|
||||
print '<br/>';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'&idan='.$_REQUEST['idan'].
|
||||
'&vue=balo&mode=pdf" target="_blank">';
|
||||
print 'Cliquez ici pour voir cette annonce au format PDF ('.
|
||||
adapteOCtets(filesize(PATH_DATA.'/jo/balo/'.
|
||||
$wdate->dateT('Y-m-d', 'Y', $ann['DateParution']).
|
||||
'/'. $ann['Lien_Annonce_Pdf'])).')';
|
||||
$wdate->dateT('Y-m-d', 'Y', $ann->DateParution).
|
||||
'/'. $ann->Lien_Annonce_Pdf)).')';
|
||||
print '</a>';
|
||||
?>
|
||||
.
|
||||
@ -106,20 +101,20 @@ if ($vue == 'balo') {
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
$tabSource = explode('-', $ann['BodaccCode']);
|
||||
$tabSource = explode('-', $ann->BodaccCode);
|
||||
$source = $tabSource[0];
|
||||
if ($source[0] == 'B') {
|
||||
$logo = 'img/logo_jo.png';
|
||||
if ($ann['BodaccNum'] == 0) {
|
||||
$libelle = 'Source BODACC '.substr($ann['BodaccCode'], -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']);
|
||||
$libelle = 'Source BODACC '.substr($ann->BodaccCode, -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution);
|
||||
} else {
|
||||
$libelle = 'Source BODACC n°'.$ann['BodaccNum'].' '.
|
||||
substr($ann['BodaccCode'], -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'. Département n°'.$ann['Departement'].
|
||||
$libelle = 'Source BODACC n°'.$ann->BodaccNum.' '.
|
||||
substr($ann->BodaccCode, -1).
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'. Département n°'.$ann->Departement.
|
||||
'. <a href="/?page=competences&siret='.$siret.
|
||||
'&type=tri">'.$ann['Tribunal'].'</a>';
|
||||
'&type=tri">'.$ann->Tribunal.'</a>';
|
||||
}
|
||||
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
||||
$logo = './img/logo_greffe.png';
|
||||
@ -138,8 +133,7 @@ if ($vue == 'balo') {
|
||||
}
|
||||
if ($ann['dateInsertionSD'] != '') {
|
||||
$libelle .= ' - Entrée en base : ';
|
||||
$libelle .= $wdate->dateT('Y-m-d', 'd/m/Y',
|
||||
$ann['dateInsertionSD']);
|
||||
$libelle .= $wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD);
|
||||
}
|
||||
print '<img src="'.$logo.'" />'.$libelle.' ';
|
||||
if (hasModeEdition()) {
|
||||
@ -175,11 +169,11 @@ if ($vue == 'balo') {
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'J.O. ASSOCIATION n°'.$ann['BodaccNum'].' du '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).'.';
|
||||
print 'Annonce n°'.$ann['NumAnnonce'].'.';
|
||||
print 'J.O. ASSOCIATION n°'.$ann->BodaccNum.' du '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).'.';
|
||||
print 'Annonce n°'.$ann->NumAnnonce.'.';
|
||||
print 'Entrée en base S&D : '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['dateInsertionSD']).'.';
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann->dateInsertionSD).'.';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -195,11 +189,11 @@ if ($vue == 'balo') {
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="3" class="StyleInfoData">
|
||||
<?php
|
||||
print 'Annonce n°'.$ann['NumAnnonce'] . '. ' .
|
||||
'Source ' . $ann['BodaccCode'] . ' ' .
|
||||
'n°' . (intval($ann['BodaccNum'])) . ' ' .
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'. Département n°'.$ann['Departement'].'.';
|
||||
print 'Annonce n°'.$ann->NumAnnonce.'. '.
|
||||
'Source '.$ann->BodaccCode.' '.
|
||||
'n°' . (intval($ann->BodaccNum)) . ' ' .
|
||||
' du '.$wdate->dateT('Y-m-d', 'd/m/Y', $ann->DateParution).
|
||||
'. Département n°'.$ann->Departement.'.';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -215,8 +209,8 @@ if ($vue == 'balo') {
|
||||
<td width="550" colspan="3" class="StyleInfoLib">
|
||||
<b>
|
||||
<?php
|
||||
foreach ($ann['evenements'] as $i => $even) {
|
||||
print $even['LibEven'].'<br/>';
|
||||
foreach ($ann->evenements as $even) {
|
||||
print $even->LibEven.'<br/>';
|
||||
}
|
||||
?>
|
||||
</b>
|
||||
@ -233,7 +227,7 @@ if ($vue == 'balo') {
|
||||
'/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|'.
|
||||
'(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|'.
|
||||
'(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/',
|
||||
'replace_siren', $ann['texteAnnonce']);
|
||||
'replace_siren', $ann->texteAnnonce);
|
||||
?>
|
||||
<td width="550" colspan="3"><code><?=$texte?></code></td>
|
||||
</tr>
|
||||
@ -243,65 +237,22 @@ if ($vue == 'balo') {
|
||||
<?php
|
||||
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
||||
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
||||
print '<a href="./?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.
|
||||
'&source='.$source;
|
||||
if ($siret == 0) {
|
||||
print '&idan='.$sourceId;
|
||||
print '">Revenir à la liste des annonces';
|
||||
}
|
||||
?>
|
||||
<a href="./?page=annonces&siret=<?=$siret?>
|
||||
&idEntreprise=<?=$idEntreprise?>
|
||||
&source=<?=$source?>
|
||||
<?=($siret*1==0) ? '&idan='.$sourceId : '';?>
|
||||
">
|
||||
Revenir à la liste des annonces
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
} else if (count($annonces) > 0) {
|
||||
$typeAnnonces = array(
|
||||
'Bodacc' => 'EVÉNEMENTS LÉGAUX',
|
||||
'Balo' => 'BALO',
|
||||
'Bomp' => 'Marchés publics',
|
||||
'Asso' => 'Associations');
|
||||
|
||||
foreach ($typeAnnonces as $type => $titre) {
|
||||
$classType = 'annonces'.$type;
|
||||
if (count($objAnnonces->$classType) > 0) {
|
||||
print '<h2>'.$titre.'</h2>';
|
||||
print '<table>';
|
||||
foreach ($objAnnonces->$classType as $ann) {
|
||||
$resume = $objAnnonces->getAnnonceResume($ann);
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate">Le '.$resume['date'].' </span>';
|
||||
print '<span id="annoncesImg">'.$resume['logo'].'</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idEntreprise='.$idEntreprise.'&'.$resume['href'].'">';
|
||||
print $resume['lib'];
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Aucune annonce bodacc pour cette entreprise
|
||||
?>
|
||||
<h2>Evénements légaux</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="100" class="StyleInfoLib"> </td>
|
||||
<td width="450" colspan="2" class="StyleInfoData">Néant</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
afficheListeAnnonces($annonces, $siret, $idEntreprise);
|
||||
}
|
||||
|
||||
// Surveillance
|
||||
|
@ -84,17 +84,9 @@ if($_REQUEST['submit']){
|
||||
}
|
||||
}
|
||||
|
||||
if($commandeEnquete == FALSE)
|
||||
{
|
||||
try {
|
||||
$O = $client->getIdentite($siret, $idEntreprise, false);
|
||||
$etab = $O['result'];
|
||||
$firephp->log($etab,'etab');
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
}
|
||||
if ($commandeEnquete == false) {
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), $idEntreprise);
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
@ -160,31 +152,56 @@ if($commandeEnquete == FALSE){
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siren</div>
|
||||
<div class="infoData">
|
||||
<?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3)?>
|
||||
<input type="hidden" name="InfoEnq[Siren]" value="<?=$etab['Siren']; ?>"/>
|
||||
<?=substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3)?>
|
||||
<input type="hidden" name="InfoEnq[Siren]" value="<?=$etab->Siren; ?>"/>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro identifiant Siret</div>
|
||||
<div class="infoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' <i>'.substr($etab['Siret'],9,5).'</i>'?></div>
|
||||
<div class="infoData">
|
||||
<?=substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' <i>'.
|
||||
substr($etab->Siret, 9, 5).'</i>'?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Numéro de TVA Intracom.</div>
|
||||
<div class="infoData"><?=substr($etab['TvaNumero'],0,2).' '.substr($etab['TvaNumero'],2,2).' '.substr($etab['TvaNumero'],-9)?></div>
|
||||
<div class="infoData">
|
||||
<?=substr($etab->TvaNumero, 0, 2).' '.
|
||||
substr($etab->TvaNumero, 2, 2).' '.
|
||||
substr($etab->TvaNumero, -9)?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
|
||||
<div class="infoData"><?=$etab['Nom']?></div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Adresse</div>
|
||||
<div class="infoData"><?=$etab['Adresse'].' '.$etab['CP'].' '.$etab['Ville']?></div>
|
||||
<div class="infoData"><?=$etab->Adresse.' '.$etab->CP.' '.$etab->Ville?></div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Téléphone <?php if (trim($etab['Tel'])==''){?><font color="Red">*</font><?php }?> / Fax</label>
|
||||
<label class="StyleInfoLib">Téléphone
|
||||
<?php
|
||||
if (trim($etab->Tel) == '') {
|
||||
print '<font color="Red">*</font>';
|
||||
}?> / Fax</label>
|
||||
<div class="field">
|
||||
<?php if (trim($etab['Tel'])!=''){ print $etab['Tel']; }else{?><input type="text" name="InfoEnq[Entrep][Tel]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Tel'];?>"/><?php } ?> <b>/</b>
|
||||
<?php if (trim($etab['Fax'])!=''){ print $etab['Fax']; }else{?><input type="text" name="InfoEnq[Entrep][Fax]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Fax'];?>"/><?php } ?>
|
||||
<?php
|
||||
if (trim($etab->Tel) != '') {
|
||||
print $etab->Tel;
|
||||
} else {
|
||||
print '<input type="text" name="InfoEnq[Entrep][Tel]" value="'.
|
||||
$_REQUEST['InfoEnq']['Entrep']['Tel'].'"/>';
|
||||
} ?> <b>/</b>
|
||||
<?php
|
||||
if (trim($etab->Fax) != '') {
|
||||
print $etab->Fax;
|
||||
} else {
|
||||
print '<input type="text" name="InfoEnq[Entrep][Fax]" value="'.
|
||||
$_REQUEST['InfoEnq']['Entrep']['Fax'].'"/>';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($etab['Tel'])!=''){?>
|
||||
<?php if (trim($etab->Tel) != '') {?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib"> Autre téléphone :</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreTel]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['AutreTel'];?>"/> </div>
|
||||
@ -193,10 +210,17 @@ if($commandeEnquete == FALSE){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">E-mail</label>
|
||||
<div class="field"><?php if (trim($etab['Mail'])!=''){ print $etab['Mail']; }else{?><input type="text" name="InfoEnq[Entrep][Mail]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Mail'];?>"/><?php }?></div>
|
||||
<div class="field">
|
||||
<?php
|
||||
if (trim($etab->Mail) != '') {
|
||||
print $etab->Mail;
|
||||
} else {
|
||||
print '<input type="text" name="InfoEnq[Entrep][Mail]"'.
|
||||
' value="'.$_REQUEST['InfoEnq']['Entrep']['Mail'].'"/>';
|
||||
}?></div>
|
||||
</div>
|
||||
|
||||
<?php if (trim($etab['Mail'])!=''){ ?>
|
||||
<?php if (trim($etab->Mail) != ''){ ?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Autre e-mail</label>
|
||||
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreMail]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['AutreTel'];?>"/></div>
|
||||
@ -206,7 +230,15 @@ if($commandeEnquete == FALSE){
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Site Web</label>
|
||||
<div class="field"><?php if (trim($etab['Web'])!=''){ print $etab['Web']; }else{?><input type="text" name="InfoEnq[Entrep][Web]" value="<?php print $_REQUEST['InfoEnq']['Entrep']['Web'];?>"/><?php }?></div>
|
||||
<div class="field">
|
||||
<?php
|
||||
if (trim($etab->Web) != '') {
|
||||
print $etab->Web;
|
||||
} else {
|
||||
print '<input type="text" name="InfoEnq[Entrep][Web]"'.
|
||||
' value="'.$_REQUEST['InfoEnq']['Entrep']['Web'].'"/>';
|
||||
}?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fieldgrp">
|
||||
@ -300,7 +332,7 @@ if( $pays=='' )
|
||||
{
|
||||
?>
|
||||
<div class="fieldgrp">
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<label class="StyleInfoLib">Type d'enquête</label>
|
||||
<div class="field">
|
||||
<input class="noborder" type="radio" id="premier" name="InfoEnq[Type]" value="premier" <?php if($_REQUEST['InfoEnq']['Type']=='premier'){print 'checked="checked"';};?>>EXPRESS ( encours inférieur à 20K€ )
|
||||
<br/>
|
||||
@ -348,7 +380,7 @@ if( isset($pays) && $pays!='' )
|
||||
<option value="2" <?php if($_REQUEST['InfoEnq']['PrecisionsChoix']=='2'){print 'selected="selected"';};?>>Enquête sur un prospect (ouverture de compte)</option>
|
||||
<option value="3" <?php if($_REQUEST['InfoEnq']['PrecisionsChoix']=='3'){print 'selected="selected"';};?>>Enquête sur un fournisseur stratégique</option>
|
||||
<option value="4" <?php if($_REQUEST['InfoEnq']['PrecisionsChoix']=='4'){print 'selected="selected"';};?>>Enquête sur un fournisseur non stratégique</option>
|
||||
<option value="5" <?php if($_REQUEST['InfoEnq']['PrecisionsChoix']=='5'){print 'selected="selected"';};?>>Autre type d'enquête (Précisez...)</option>
|
||||
<option value="5" <?php if($_REQUEST['InfoEnq']['PrecisionsChoix']=='5'){print 'selected="selected"';};?>>Autre type d'enquête (Précisez...)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,19 +1,15 @@
|
||||
<?
|
||||
<?php
|
||||
if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
$etabs = scoresws_etablissements($siret, $siren, $idEntreprise);
|
||||
if ($etabs === false) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
//$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
|
||||
?>
|
||||
<div id="center">
|
||||
@ -45,7 +41,7 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<table>
|
||||
<?php
|
||||
foreach ($etabs->liste->item as $i => $etab) {
|
||||
foreach ($etabs->liste->item as $etab) {
|
||||
$type = ($etab->Siege == 1) ? 'siège ' : 'établ. ';
|
||||
$type .= ($etab->Actif == 1) ? 'actif' : 'inactif';
|
||||
if ($etab->Nic == 0 || $etab->Nic >= 99990) {
|
||||
|
@ -3,312 +3,11 @@ if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
function formatPct($pct)
|
||||
{
|
||||
$pct = round($pct / 10, 0) * 10;
|
||||
if ($pct == 0) {
|
||||
$pct = 10;
|
||||
}
|
||||
return $pct;
|
||||
}
|
||||
|
||||
function afficheEvaluation($titre, $champ, $image)
|
||||
{
|
||||
print '<h3><u>'.$titre.' :</u></h3>';
|
||||
print '<div class="stats gradiant_pic">';
|
||||
print '<ul>';
|
||||
print '<li>';
|
||||
print '<i>'.$etab[$champ].'</i>';
|
||||
print '<div class="blocdegrade clearfix">';
|
||||
print '<span class="textdegrade">'.$titre.'</span>';
|
||||
print '<div class="imgdegrade">';
|
||||
print '<img class="borderimg" src="./img/indiscore/imgscores-'.
|
||||
formatPct($etab[$image]).'.png"/>';
|
||||
print '</div>';
|
||||
print '<div class="regle"><img src="./img/sgradiant2.png" /></div>';
|
||||
print '</div>';
|
||||
print '</li>';
|
||||
print '</ul>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||||
print '<pre>c';
|
||||
print_r($etab);
|
||||
print 'c</pre>';
|
||||
require_once 'scoresws/indiscore.php'
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
<h1 class="titre">INDISCORE©</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Numéro identifiant Siret du siège</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print substr($etab->Siren, 0, 3).' '.
|
||||
substr($etab->Siren, 3, 3).' '.
|
||||
substr($etab->Siren, 6, 3).' '.
|
||||
substr($etab->Siret, -5);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($etab->NumRC) == true && $etab->NumRC != 0) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->NumRC?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Raison sociale & coordonnées</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->Nom;
|
||||
if (isset($etab->Nom2) == true && $etab->Nom2 != '') {
|
||||
print '<br/>'.$etab->Nom2;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($etab->Enseigne != '' && $etab->Sigle != '') {
|
||||
$titre = 'Enseigne / Sigle';
|
||||
$lib = $etab->Enseigne.' / '.$etab->Sigle;
|
||||
} else if ($etab->Enseigne != '' && $etab->Sigle == '') {
|
||||
$titre = 'Enseigne';
|
||||
$lib = $etab->Enseigne;
|
||||
} else if ($etab->Enseigne == '' && $etab->Sigle != '') {
|
||||
$titre = 'Sigle';
|
||||
$lib = $etab->Sigle;
|
||||
} else {
|
||||
$titre = '';
|
||||
}
|
||||
if ($titre != '') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="350" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
print $etab->FJ_lib; //@todo INSEE //.' ('.$etab->FJ
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">
|
||||
Date de création de l'entreprise</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<?php
|
||||
$dateCreation = str_replace('-', '', $etab->DateCreaEn);
|
||||
$date = new WDate;
|
||||
print $date->dateT('Ymd', 'm/Y', $dateCreation);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Adresse?><br/>
|
||||
<?php
|
||||
if ($etab->Adresse2 != '') {
|
||||
print $etab->Adresse2.'<br/>';
|
||||
}
|
||||
print $etab->CP.' '.$etab->Ville;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="350" class="StyleInfoData"><?=$etab->Tel?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td colspan="2" width="550" class="StyleInfoData">
|
||||
<?php
|
||||
require_once 'surveillance/surveillance.php';
|
||||
print getSurveillance('score', $siret);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
L'évaluation indiScore© est en partie basée
|
||||
sur les points notables suivants :<br/>
|
||||
<?php
|
||||
afficheEvaluation('Conformité légale',
|
||||
'AnalyseConfor', 'ScoreConfor');
|
||||
afficheEvaluation('Dirigeance',
|
||||
'AnalyseDirigeance', 'ScoreDirigeance');
|
||||
afficheEvaluation('Solvabilité',
|
||||
'AnalyseSolvabilite', 'Indiscore');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$millesimeMax =
|
||||
date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y') - 2));
|
||||
if ($etab->NbBilansScore > 0 &&
|
||||
$etab->Bilans[0]['Millesime'] >= $millesimeMax) {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'A la lecture du dernier bilan, la situation financière de'.
|
||||
'l'entreprise '.$etab->Nom.' est <b>'.
|
||||
$etab->tabInfosNotations['SituationFinanciere'].'</b>.<br/>';
|
||||
print '<!-- Cette notation financière est '.
|
||||
$etab->tabInfosNotations['Notation'].'.<br/>-->';
|
||||
if (html_entity_decode($etab->tabInfosNotations['ProbabiliteDefaut']) !=
|
||||
'En défaut') {
|
||||
print 'La probabilité de défaillance associée'.
|
||||
' à cette note avoisine les '.
|
||||
number_format($etab->tabInfosNotations['ProbabiliteDefaut'],
|
||||
3, ',', ' ').' %';
|
||||
} else {
|
||||
print 'Cette entreprise est défaillante'.
|
||||
' ou sur le point de le devenir.';
|
||||
}
|
||||
// [EquivalenceBDF]
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print '<i>Pour information, les méthodes standards donnent :'.
|
||||
' Conan & Holder = <b>'.$etab->scores['ConanH'].
|
||||
'</b>, Afdcc2 = <b>'.$etab->scores['Afdcc2'].
|
||||
'</b> et Score Z = <b>'.$etab->scores['Z'].'</b>.</i>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?php
|
||||
print 'La situation financière de l\'entreprise ne peut être'.
|
||||
' évaluée en détail car ';
|
||||
if ($etab->Bilans[0]['Millesime'] < $millesimeMax &&
|
||||
count($etab->Bilans) > 0) {
|
||||
print 'le dernier bilan disponible date de '.
|
||||
substr($etab->Bilans[0]['Millesime'], 0, 4).'.';
|
||||
} else {
|
||||
print 'aucun bilan n\'est disponible.';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?=html_entity_decode($etab->infoPaiement)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Compte tenu des informations disponibles auprès des sources
|
||||
officielles Scores et Décisions présente la conclusion
|
||||
suivante :<br/>
|
||||
<?php
|
||||
switch ($_SESSION['tabInfo']['typeScore']) {
|
||||
case '20':
|
||||
$maxIndiscore = $_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore20;
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore =
|
||||
(empty($_SESSION['tabInfo']['typeScore']) == true) ? '100' :
|
||||
$_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab->Indiscore;
|
||||
break;
|
||||
}
|
||||
print '<h3>LE SCORE EST DE '.$indiscore.
|
||||
' SUR '.$maxIndiscore.' POINTS</h3>';
|
||||
if ($etab->infoEncours != '' &&
|
||||
is_numeric($etab->encours) == false &&
|
||||
$etab->encours == 'N/A') {
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
} else {
|
||||
if ($indiscore != 0) {
|
||||
print '<i>La tendance de la note est '.
|
||||
$etab->TendanceIndiscore.'</i>';
|
||||
print '<h3>L\'ENCOURS MAXIMUM CONSEILLÉ EST DE '.
|
||||
round($etab->encours / 1000).' K€</h3>';
|
||||
}
|
||||
print '<h3>'.$etab->infoEncours.'</h3>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
<img src="./img/logo_indiscore.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="confidentiel blockh2">
|
||||
<?php
|
||||
require_once 'cgu/cgu.php';
|
||||
|
@ -5,7 +5,7 @@ if (!page_checkParams()) {
|
||||
|
||||
require_once 'scoresws/scoresws.php';
|
||||
require_once 'ratios/ratios.php';
|
||||
require_once('ratios/content.php');
|
||||
require_once 'ratios/content.php';
|
||||
|
||||
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||||
$bilansInfos = $result['bilansInfos'];
|
||||
|
@ -1,209 +1,40 @@
|
||||
<?php
|
||||
// Traitement des paramètres
|
||||
if (!page_checkParams()) {
|
||||
die('Paramètres incorrects !');
|
||||
}
|
||||
|
||||
$niveau = isset($_REQUEST['niveau']) ? $_REQUEST['niveau'] : '';
|
||||
|
||||
require_once 'utils.php';
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'logos/logos.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
require_once 'scoresws/identite.php';
|
||||
require_once 'common/dates.php';
|
||||
$wdate = new WDate;
|
||||
|
||||
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||||
?>
|
||||
|
||||
<div id="center">
|
||||
<h1>RAPPORT COMPLET</h1>
|
||||
<p id="rsynthese">SOCIÉTÉ : <?=$etab['Nom']?></p>
|
||||
print '<div id="center">';
|
||||
print '<h1>RAPPORT COMPLET</h1>';
|
||||
print '<p id="rsynthese">SOCIÉTÉ : '.$raisonSociale.'</p>';
|
||||
|
||||
<?php
|
||||
// BLOC IDENTITE
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Identite
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'scoresws/identite.php';
|
||||
require_once 'identite/content.php';
|
||||
// FIN BLOC IDENTITE
|
||||
|
||||
// BLOC ANNONCES
|
||||
$annonces = scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan);
|
||||
?>
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Annonces
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'annonces/annonces.php';
|
||||
print '<h1 class="titre page">ANNONCES LÉGALES</h1>';
|
||||
$annonces = scoresws_annonces($siret, $siren, $idEntreprise);
|
||||
afficheListeAnnonces($annonces, $siret, $idEntreprise);
|
||||
|
||||
<h1 class="titre page">ANNONCES LÉGALES</h1>
|
||||
<?php
|
||||
if (count($annonces) > 0) {
|
||||
// Tri des annonces dans des tableaux différents
|
||||
$annoncesBodacc = array();
|
||||
$annoncesBalo = array();
|
||||
$annoncesAsso = array();
|
||||
foreach ($annonces as $ann) {
|
||||
if ($ann['BodaccCode'] == 'BODA' ||
|
||||
$ann['BodaccCode'] == 'BODB' ||
|
||||
$ann['BodaccCode'] == 'BODC') {
|
||||
$annoncesBodacc[] = $ann;
|
||||
} else if ($ann['BodaccCode'] == 'BALO') {
|
||||
$annoncesBalo[] = $ann;
|
||||
} else if ($ann['BodaccCode'] == 'ASSO') {
|
||||
$annoncesAsso[] = $ann;
|
||||
} else {
|
||||
$annoncesBodacc[] = $ann;
|
||||
}
|
||||
}
|
||||
// Affiche annonces Bodacc
|
||||
if (count($annoncesBodacc) > 0) {
|
||||
print '<h2>EVÉNEMENTS LÉGAUX</h2>';
|
||||
print '<table>';
|
||||
foreach ($annoncesBodacc as $ann) {
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate"><p>Le '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'</p></span>';
|
||||
print '<span id="annoncesImg">';
|
||||
$tabSource = explode('-', $ann['BodaccCode']);
|
||||
$source = $tabSource[0];
|
||||
if ($source[0] == 'B') {
|
||||
print '<img src="./img/logo_jo.png" title="Source BODACC '.
|
||||
$ann['BodaccNum'].' '.substr($source, -1).' '.
|
||||
substr($ann['DateParution'], 0, 4).'"/>';
|
||||
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
||||
print '<img src="./img/logo_greffe.png"'.
|
||||
' title="Source Collecte Greffe"/>';
|
||||
} else if ($source[0] == 'P') {
|
||||
print '<img src="./img/logo_inpi.png"'.
|
||||
' title="Source Collecte RNCS"/>';
|
||||
} else {
|
||||
print '<img src="./img/logo_jal.png"'.
|
||||
' title="Source Collecte JAL';
|
||||
if ($tabSource[1] > 0) {
|
||||
print ' '.$tabSource[1];
|
||||
}
|
||||
print '"/>';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idan='.$ann['id'].'&vue=bodacc">';
|
||||
foreach ($ann['evenements'] as $even) {
|
||||
print $even['LibEven'];
|
||||
$numEven = intval($even['CodeEven']);
|
||||
if ($numEven > 3000 && $numEven < 3999) {
|
||||
print ' (clôture au '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['dateEffet']).')';
|
||||
}
|
||||
print '<br/>';
|
||||
}
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// Affiche annonces Balo
|
||||
if (count($annoncesBalo) > 0) {
|
||||
print '<h2>BALO</h2>';
|
||||
print '<table>';
|
||||
foreach ($annoncesBalo as $ann) {
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate">Le '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'</span>';
|
||||
print '<span id="annoncesImg">';
|
||||
if ($ann['BodaccCode'] == 'BALO') {
|
||||
print '<img src="./img/logo_jo.png"'.
|
||||
' title="Source BALO n°'.$ann['BodaccNum'].'"/>';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idan='.$ann['id'].'&vue=balo">';
|
||||
foreach ($ann['evenements'] as $even) {
|
||||
print $even['LibEven'];
|
||||
$numEven = intval($even['CodeEven']);
|
||||
if ($numEven > 3000 && $numEven < 3999) {
|
||||
print ' (clôture au '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['dateEffet']).')';
|
||||
}
|
||||
print '<br/>';
|
||||
}
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// Affiche annonces Asso
|
||||
if (count($annoncesAsso) > 0) {
|
||||
print '<h2>Associations</h2>';
|
||||
print '<table>';
|
||||
foreach ($annoncesAsso as $ann) {
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td>';
|
||||
print '<td width="140" class="StyleInfoLib">';
|
||||
print '<span id="annoncesDate">Le '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['DateParution']).
|
||||
'</span>';
|
||||
print '<span id="annoncesImg">';
|
||||
if ($ann['BodaccCode'] == 'ASSO') {
|
||||
print '<img src="./img/logo_jo.png"'.
|
||||
' title="Source JO ASSOCIATION n°'.$ann['BodaccNum'].'"/>';
|
||||
}
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td width="450" colspan="2" class="StyleInfoData">';
|
||||
print '<a href="/?page=annonces&siret='.$siret.
|
||||
'&idan='.$ann['id'].'&vue=asso">';
|
||||
foreach ($ann['evenements'] as $even) {
|
||||
print $even['LibEven'];
|
||||
$numEven = intval($even['CodeEven']);
|
||||
if ($numEven > 3000 && $numEven < 3999) {
|
||||
print ' (clôture au '.
|
||||
$wdate->dateT('Y-m-d', 'd/m/Y', $ann['dateEffet']).')';
|
||||
}
|
||||
print '<br/>';
|
||||
}
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
}
|
||||
} else {
|
||||
// Aucune annonce bodacc pour cette entreprise
|
||||
?>
|
||||
<h2>Evénements légaux</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="100" class="StyleInfoLib"> </td>
|
||||
<td width="450" colspan="2" class="StyleInfoData">Néant</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
// FIN BLOC ANNONCES
|
||||
|
||||
// BLOC DIRIGEANTS
|
||||
<?php
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Dirigeants
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'scoresws/dirigeants.php';
|
||||
$dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
|
||||
print '<h1 class="page">DIRIGEANTS</h1>';
|
||||
afficheDirigeants($dirs);
|
||||
// FIN BLOC DIRIGEANTS
|
||||
|
||||
// BLOC LIENS
|
||||
// FIN BLOC LIENS
|
||||
|
||||
// BLOC SYNTHESE
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Synthese
|
||||
// -------------------------------------------------------------------------- //
|
||||
$ratio = (isset($_REQUEST['ratio']) == true) ? $_REQUEST['ratio'] : '';
|
||||
$typeBilan = (isset($_REQUEST['type' ]) == true) ? $_REQUEST['type' ] : '';
|
||||
|
||||
@ -233,384 +64,152 @@ $nbrAnnees = count($bilansInfos) - 1;
|
||||
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $ratio);
|
||||
$dataGraph = $data['graph'];
|
||||
$dataEvol = $data['evol'];
|
||||
?>
|
||||
<h1 class="page">SYNTHÈSE</h1>
|
||||
|
||||
<table border="0" align="left">
|
||||
<?php
|
||||
radioTypeBilan($numBilanN, $numBilanC, $typeBilan,
|
||||
print '<h1 class="page">SYNTHÈSE</h1>';
|
||||
print '<table border="0" align="left">';
|
||||
radioTypeBilan($numBilanN, $numBilanC, $typeBilan,
|
||||
$page, $siret, $idEntreprise);
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
print '</table>';
|
||||
afficheSynthese($numBilanN, $numBilanC, $numBilanB, $numBilanA,
|
||||
$ratio, $bilansInfos, $ratiosInfos,
|
||||
$dataEvol, $dataGraph, $typeBilan,
|
||||
$page, $siret, $siren, $idEntreprise);
|
||||
// FIN BLOC SYNTHESE
|
||||
|
||||
// BLOC BILANS
|
||||
require_once 'ratios/bilans.php'
|
||||
// FIN BLOC BILANS
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Bilans
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'ratios/bilans.php';
|
||||
|
||||
// BLOC RATIOS
|
||||
require_once('ratios/content.php');
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Ratios
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'ratios/content.php';
|
||||
print '<h1 class="titre page">RATIOS</h1>';
|
||||
$mil = (isset($_REQUEST['mil']) == true) ? $_REQUEST['mil'] : '';
|
||||
$bilan = getNumBilan($mil);
|
||||
|
||||
if (count($bilansInfos) == 0) {
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td><td><b>
|
||||
Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
print '<table>';
|
||||
print '<tr>';
|
||||
print '<td width="30"> </td><td><b>';
|
||||
print 'Aucun bilan disponible pour cette entreprise !</b></td></tr>';
|
||||
print '</table>';
|
||||
} else {
|
||||
?>
|
||||
<table>
|
||||
<?php
|
||||
print '<table>';
|
||||
afficheSecteurActivite();
|
||||
radioTypeBilan($numBilanN, $numBilanC, $typeBilan,
|
||||
$page, $siret, $idEntreprise);
|
||||
selectMillesime($bilansInfos, $page, $siret, $idEntreprise, $mil);
|
||||
afficheDureeBilan(&$bilansInfos, $bilan);
|
||||
afficheDureeBilan($bilansInfos, $bilan);
|
||||
afficheRetourRatios($ratio);
|
||||
?>
|
||||
</table>
|
||||
print '</table>';
|
||||
|
||||
<div class="blockh2">
|
||||
<table id="ratios">
|
||||
<tbody>
|
||||
<?php print ratios_tablerow($ratiosInfos, $bilan, $ratio);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
print '<div class="blockh2">';
|
||||
print '<table id="ratios">';
|
||||
print '<tbody>';
|
||||
print ratios_tablerow($ratiosInfos, $bilan, $ratio);
|
||||
print '</tbody>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
print '<br/>';
|
||||
afficheGraphEvol($ratio, $bilan, $page, $siret, $siren, $idEntreprise);
|
||||
// FIN BLOC RATIOS
|
||||
|
||||
function formatPct($pct) {
|
||||
$pct=round($pct/10,0)*10;
|
||||
if ($pct==0) $pct=10;
|
||||
return $pct;
|
||||
}
|
||||
|
||||
require_once 'cache/cache.php';
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'partenaires/classMMap.php';
|
||||
require_once 'partenaires/classMCoface.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'scoresws/scoresws.php';
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Commentaires
|
||||
// -------------------------------------------------------------------------- //
|
||||
$niveau = (isset($_REQUEST['niveau']) == true) ? $_REQUEST['niveau'] : '';
|
||||
$etab = scoresws_indiscore($siret, $siren, $idEntreprise, $niveau);
|
||||
$tabCommentaires = $etab['tabCommentaires'];
|
||||
$tabProjection = $etab['tabVariables'];
|
||||
FB::log($tabProjection, 'tabProjection');
|
||||
//=> BLOC COMMENTAIRES
|
||||
?>
|
||||
<h1 class="page">COMMENTAIRES</h1>
|
||||
<br/>
|
||||
<div class="blockh2" id="commentaires">
|
||||
<?php
|
||||
$tabCommentaires = $etab->tabCommentaires;
|
||||
$tabProjection = $etab->tabVariables;
|
||||
print '<h1 class="page">COMMENTAIRES</h1>';
|
||||
print '<br/>';
|
||||
print '<div class="blockh2" id="commentaires">';
|
||||
require_once 'commentaires/commentaires.php';
|
||||
$graphCouleurs = array();
|
||||
$couleurs = array();
|
||||
if(count($tabCommentaires)>0){
|
||||
if (count($tabCommentaires) > 0) {
|
||||
$totalLigne = count($tabCommentaires);
|
||||
$currentLigne = 0;
|
||||
$inH = 0;
|
||||
$inTable = false;
|
||||
foreach($tabCommentaires as $key => $commentaires){
|
||||
//FB::log($commentaires, 'T');
|
||||
foreach ($tabCommentaires as $commentaires) {
|
||||
$output = '';
|
||||
$ligne = true;
|
||||
$currentLigne++;
|
||||
if(!is_array($commentaires) && !empty($commentaires)){
|
||||
//Traitement préalable des lignes
|
||||
$commentaires = html_entity_decode($commentaires,
|
||||
ENT_COMPAT,'utf-8');
|
||||
//Traitement des balises siren
|
||||
if (is_array($commentaires) == false &&
|
||||
empty($commentaires) == false) {
|
||||
// Traitement préalable des lignes
|
||||
$commentaires =
|
||||
html_entity_decode($commentaires, ENT_COMPAT, 'utf-8');
|
||||
// Traitement des balises siren
|
||||
$commentaires = commentaires_siren($commentaires);
|
||||
//Traitement des balises lien
|
||||
// Traitement des balises lien
|
||||
$commentaires = commentaires_lien($commentaires);
|
||||
//Traitement des balises li+, li-, li:, li
|
||||
// Traitement des balises li+, li-, li:, li
|
||||
$commentaires = commentaires_liste($commentaires);
|
||||
//Traitement des images
|
||||
// Traitement des images
|
||||
$commentaires = commentaires_image($commentaires);
|
||||
//Récupération des couleurs pour les graphiques
|
||||
// Récupération des couleurs pour les graphiques
|
||||
$couleurs = commentaires_graphique_couleur($commentaires);
|
||||
if (count($couleurs)>0){
|
||||
if (count($couleurs) > 0) {
|
||||
$graphCouleurs = $couleurs;
|
||||
$commentaires = preg_replace('/COULEUR\([^\)]*\)/', '', $commentaires);
|
||||
$commentaires =
|
||||
preg_replace('/COULEUR\([^\)]*\)/', '', $commentaires);
|
||||
$couleurs = array();
|
||||
}
|
||||
//Traitement des graphiques
|
||||
// Traitement des graphiques
|
||||
$commentaires = commentaires_graphique($commentaires);
|
||||
|
||||
//Traitement pour bloc texte
|
||||
if (preg_match('/(.*?)\<h([0-9]{1})\>(.*?)\<\/h[0-9]{1}\>/', $commentaires, $matches)){
|
||||
//Fermeture
|
||||
if ($inH>0){
|
||||
$commentaires = $matches[1].'</div><h'.$matches[2].'>'.$matches[3].'</h'.$matches[2].'>';
|
||||
// Traitement pour bloc texte
|
||||
if (preg_match('/(.*?)\<h([0-9]{1})\>(.*?)\<\/h[0-9]{1}\>/',
|
||||
$commentaires, $matches)) {
|
||||
// Fermeture
|
||||
if ($inH > 0) {
|
||||
$commentaires =
|
||||
$matches[1].'</div><h'.
|
||||
$matches[2].'>'.
|
||||
$matches[3].'</h'.
|
||||
$matches[2].'>';
|
||||
}
|
||||
//Ouverture
|
||||
$commentaires = $commentaires.'<div class="texth'.$matches[2].'">';
|
||||
// Ouverture
|
||||
$commentaires =
|
||||
$commentaires.'<div class="texth'.$matches[2].'">';
|
||||
$inH++;
|
||||
$ligne = false;
|
||||
}
|
||||
//Fermeture dernier div
|
||||
if ($currentLigne == $totalLigne){
|
||||
// Fermeture dernier div
|
||||
if ($currentLigne == $totalLigne) {
|
||||
$commentaires = $commentaires.'</div>';
|
||||
}
|
||||
|
||||
//Traitement pour fin bloc texte;
|
||||
// Traitement pour fin bloc texte;
|
||||
$output.= $commentaires."\n";
|
||||
|
||||
//Détection des début et fin de tableau
|
||||
if ( preg_match('/<(table)/i', $commentaires) ){
|
||||
// Détection des début et fin de tableau
|
||||
if (preg_match('/<(table)/i', $commentaires)) {
|
||||
$inTable = true;
|
||||
}
|
||||
if ( preg_match('/<\/(table)>/i', $commentaires) ){
|
||||
if (preg_match('/<\/(table)>/i', $commentaires)) {
|
||||
$inTable = false;
|
||||
}
|
||||
//Nouvelle ligne
|
||||
|
||||
if($inTable){ $ligne = false;}
|
||||
if($ligne){ $output.= '<br/>'; }
|
||||
echo $output;
|
||||
// Nouvelle ligne
|
||||
if ($inTable) {
|
||||
$ligne = false;
|
||||
}
|
||||
if ($ligne) {
|
||||
$output .= '<br/>';
|
||||
}
|
||||
print $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
//=> FIN BLOC COMMENTAIRES
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
//=> BLOC INDISCORE (evaluation conclusion)
|
||||
?>
|
||||
<br/>
|
||||
<h1 class="titre page">INDISCORE©</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="340" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||||
<td width="340" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' '.substr($etab['Siret'],-5)?></td>
|
||||
</tr>
|
||||
<? if ($etab['NumRC']*1<>0) { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||
<td width="340" class="StyleInfoData"><?=$etab['NumRC']?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
print '</div>';
|
||||
|
||||
<h2>Raison sociale & coordonnées</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="340" class="StyleInfoData"><?=$etab['Nom'];
|
||||
if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?></td>
|
||||
</tr>
|
||||
<?
|
||||
if ($etab['Enseigne']<>'' && $etab['Sigle']<>'') { $titre='Enseigne / Sigle'; $lib=$etab['Enseigne'].' / '.$etab['Sigle']; }
|
||||
elseif ($etab['Enseigne']<>'' && $etab['Sigle']=='') { $titre='Enseigne'; $lib=$etab['Enseigne']; }
|
||||
elseif ($etab['Enseigne']=='' && $etab['Sigle']<>'') { $titre='Sigle'; $lib=$etab['Sigle']; }
|
||||
else $titre='';
|
||||
if ($titre<>'') {
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib"><?=$titre?></td>
|
||||
<td width="340" class="StyleInfoData"><?=$lib?></td>
|
||||
</tr><? } ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||
<td width="340" class="StyleInfoData"><?=$etab['FJ_lib'];//@todo INSEE //.' ('.$etab['FJ']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Date de création de l'entreprise</td>
|
||||
<td width="340" class="StyleInfoData"><? $dateCreation=str_replace('-','',$etab['DateCreaEn']);
|
||||
echo $wdate->dateT('Ymd', 'm/Y', $dateCreation);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||
<td width="340" class="StyleInfoData"><?=$etab['Adresse']?><br/>
|
||||
<? if ($etab['Adresse2']<>'') echo $etab['Adresse2'].'<br/>';?>
|
||||
<?=$etab['CP']?> <?=$etab['Ville']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
||||
<td width="340" class="StyleInfoData"><?=$etab['Tel']?></td>
|
||||
</tr>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Indiscore (evaluation conclusion)
|
||||
// -------------------------------------------------------------------------- //
|
||||
require_once 'scoresws/indiscore.php';
|
||||
|
||||
<h2>Évaluation</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="540" colspan="2" class="StyleInfoData">L'évaluation indiScore© est en partie basée sur les points notables suivants :<br/>
|
||||
<h3><u>Conformité légale :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$etab['AnalyseConfor']?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Conformité</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['ScoreConfor'])?>.png"/></div>
|
||||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><u>Dirigeance :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i><?=$etab['AnalyseDirigeance']?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Dirigeance</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['ScoreDirigeance'])?>.png"/></div>
|
||||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><u>Solvabilité :</u></h3>
|
||||
<div class="stats gradiant_pic">
|
||||
<ul>
|
||||
<li>
|
||||
<i>L'analyse de la solvabilité est <?=$etab['AnalyseSolvabilite']?></i>
|
||||
<div class="blocdegrade clearfix">
|
||||
<span class="textdegrade">Solvabilité</span>
|
||||
<div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-<?=formatPct($etab['Indiscore'])?>.png"/></div>
|
||||
<div class="regle"><img src="./img/sgradiant2.png" /></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
$millesimeMax=date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));
|
||||
if ($etab['NbBilansScore']>0 && $etab['Bilans'][0]['Millesime']>=$millesimeMax)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="540" colspan="2" class="StyleInfoData">A la lecture du dernier bilan, la situation financière de l'entreprise <?=$etab['Nom']?> est <b><?=$etab['tabInfosNotations']['SituationFinanciere']?></b>.<br/>
|
||||
<!-- Cette notation financière est <?=$etab['tabInfosNotations']['Notation']?>.<br/>-->
|
||||
<?php
|
||||
if (html_entity_decode($etab['tabInfosNotations']['ProbabiliteDefaut'])<>'En défaut')
|
||||
echo 'La probabilité de défaillance associée à cette note avoisine les '.
|
||||
number_format($etab['tabInfosNotations']['ProbabiliteDefaut'],3,',',' ') .' %';
|
||||
else
|
||||
echo 'Cette entreprise est défaillante ou sur le point de le devenir.';
|
||||
//[EquivalenceBDF]
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="540" colspan="2" class="StyleInfoData">
|
||||
|
||||
<i>Pour information, les méthodes standards donnent : Conan & Holder = <b><?=$etab['scores']['ConanH']?></b>, Afdcc2 = <b><?=$etab['scores']['Afdcc2']?></b> et Score Z = <b><?=$etab['scores']['Z']?></b>.</i>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<? } else { ?>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="540" colspan="2" class="StyleInfoData">La situation financière de l'entreprise ne peut être évaluée en détail car <?if ($etab['Bilans'][0]['Millesime']<$millesimeMax && count($etab['Bilans'])>0 ) {
|
||||
echo 'le dernier bilan disponible date de '.substr($etab['Bilans'][0]['Millesime'],0,4).'.';
|
||||
} else {
|
||||
echo 'aucun bilan n\'est disponible.';
|
||||
} ?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr><td colspan="3"> </td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Paiements</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
<?=html_entity_decode($etab['infoPaiement'])?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Conclusion</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="550" colspan="2" class="StyleInfoData">
|
||||
Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :<br/>
|
||||
<?php
|
||||
switch($_SESSION['tabInfo']['typeScore'])
|
||||
{
|
||||
case '20':
|
||||
$maxIndiscore = $_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab['Indiscore20'];
|
||||
break;
|
||||
case '100':
|
||||
default:
|
||||
$maxIndiscore = empty($_SESSION['tabInfo']['typeScore'])? '100' : $_SESSION['tabInfo']['typeScore'];
|
||||
$indiscore = $etab['Indiscore'];
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<h3>LE SCORE EST DE <?=$indiscore?> SUR <?=$maxIndiscore?> POINTS</h3>
|
||||
<?php
|
||||
if($etab['infoEncours']!='' && !is_numeric($etab['encours']) && $etab['encours']=='N/A'){ ?>
|
||||
<h3><?=$etab['infoEncours'];?></h3>
|
||||
<?php
|
||||
}else{ ?>
|
||||
<?php
|
||||
if ($indiscore!=0) { ?>
|
||||
<i>La tendance de la note est <?=$etab['TendanceIndiscore']?></i>
|
||||
<h3>L'ENCOURS MAXIMUM CONSEILLÉ EST DE <?=round($etab['encours']/1000)?> K€</h3>
|
||||
<?php } ?>
|
||||
<h3><?=$etab['infoEncours'];?></h3>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3" align="center"><img src="./img/logo_indiscore.png"/></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
//=> FIN BLOC INDISCORE
|
||||
|
||||
|
||||
?>
|
||||
<p class="confidentiel">
|
||||
<?php
|
||||
print '<p class="confidentiel">';
|
||||
require_once 'cgu/cgu.php';
|
||||
echo afficheCgu();
|
||||
?>
|
||||
</p>
|
||||
print afficheCgu();
|
||||
print '</p>';
|
||||
|
||||
</div>
|
||||
<?php
|
||||
print '</div>';
|
||||
|
@ -1,64 +1,43 @@
|
||||
<?php
|
||||
require_once 'partenaires/classMTva.php';
|
||||
require_once 'common/dates.php';
|
||||
require_once 'saisie/constantes.php';
|
||||
require_once 'saisie/saisie_logo.php';
|
||||
|
||||
$tabInfo = $_SESSION['tabInfo'];
|
||||
|
||||
$message = '';
|
||||
|
||||
//Sauvegarde du formulaire
|
||||
if ( isset($_REQUEST['submit']) && $_REQUEST['submit']=='Sauver' ) {
|
||||
|
||||
if (isset($_REQUEST['submit']) == true && $_REQUEST['submit'] == 'Sauver') {
|
||||
// Sauvegarde du formulaire
|
||||
require_once 'saisie/saisie_logo.php';
|
||||
require_once 'saisie/saisie_save.php';
|
||||
saisie_logo($siren);
|
||||
$message = saisie_save($siret, $idEntreprise, $tabInfo);
|
||||
$message = saisie_save($siret, $idEntreprise, $_SESSION['tabInfo']);
|
||||
}
|
||||
|
||||
try {
|
||||
$O = $client->getIdentite($siret, $idEntreprise, false);
|
||||
$etab=$O['result'];
|
||||
$tabEntrep=array();
|
||||
$tabEntrep['raisonSociale']=$etab['Nom'];
|
||||
$tabEntrep['siren']=$etab['Siren'];
|
||||
$tabEntrep['tva']=$etab['TvaNumero'];
|
||||
$tabEntrep['isin']=$etab['Isin'];
|
||||
$tabEntrep['AutreId']=$etab['AutreId'];
|
||||
$tabEntrep['active']=$etab['Statut'];
|
||||
$tabEntrep['Source']=$etab['Source'];
|
||||
$tabEntrep['SourceId']=$etab['SourceId'];
|
||||
$tabEntrep['codeCommune']=$etab['Dept'].$etab['codeCommune'];
|
||||
$tabEntrep['nafEn']=$etab['NafEnt'];
|
||||
$tabEntrep['nafEt']=$etab['NafEtab'];
|
||||
$_SESSION['tabInfo']['entrep']=$tabEntrep;
|
||||
} catch (SoapFault $fault) {
|
||||
require_once 'soaperror.php';
|
||||
processSoapFault($client,$fault,$tabInfo);
|
||||
die();
|
||||
require_once 'scoresws/scoresws.php';
|
||||
$etab = scoresws_identite($siret, substr($siret, 0, 9), $idEntreprise);
|
||||
|
||||
$tabEntrep = array();
|
||||
$tabEntrep['raisonSociale'] = $etab->Nom;
|
||||
$tabEntrep['siren'] = $etab->Siren;
|
||||
$tabEntrep['tva'] = $etab->TvaNumero;
|
||||
$tabEntrep['isin'] = $etab->Isin;
|
||||
$tabEntrep['AutreId'] = $etab->AutreId;
|
||||
$tabEntrep['active'] = $etab->Statut;
|
||||
$tabEntrep['Source'] = $etab->Source;
|
||||
$tabEntrep['SourceId'] = $etab->SourceId;
|
||||
$tabEntrep['codeCommune'] = $etab->Dept.$etab->codeCommune;
|
||||
$tabEntrep['nafEn'] = $etab->NafEnt;
|
||||
$tabEntrep['nafEt'] = $etab->NafEtab;
|
||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||
|
||||
print '<div id="center">';
|
||||
if ($message != '') {
|
||||
print '<div style="margin:5px; padding: 0pt 0.7em;"'.
|
||||
' class="ui-state-highlight ui-corner-all">';
|
||||
print '<p><span style="float: left; margin-right: 0.3em;"'.
|
||||
' class="ui-icon ui-icon-info"></span>'.$message.'</p>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="center">
|
||||
<?php
|
||||
if ($message!='') {
|
||||
?>
|
||||
<div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all">
|
||||
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
||||
<?=$message?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($etab['Siege']==0){
|
||||
?>
|
||||
<h1 class="titre">IDENTITE DE L'ÉTABLISSEMENT</h1>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<h1 class="titre">IDENTITE DE L'ENTREPRISE</h1>
|
||||
<?php
|
||||
if ($etab->Siege == 0) {
|
||||
print '<h1 class="titre">IDENTITE DE L\'ÉTABLISSEMENT</h1>';
|
||||
} else {
|
||||
print '<h1 class="titre">IDENTITE DE L\'ENTREPRISE</h1>';
|
||||
}
|
||||
require_once 'saisie/saisie_form.php';
|
||||
?>
|
||||
</div>
|
||||
print '</div>';
|
||||
|
Loading…
Reference in New Issue
Block a user