Merge complet
@ -33,8 +33,8 @@ define ('SITEINST_URL1', 'http://www.scores-decisions.com/');
|
|||||||
define ('SITEINST_URL2', 'http://www.scores-decisions.com/');
|
define ('SITEINST_URL2', 'http://www.scores-decisions.com/');
|
||||||
|
|
||||||
/** Celeste **/
|
/** Celeste **/
|
||||||
define ('WEBSERVICE_URL', 'http://78.31.45.206/ws/');
|
define ('WEBSERVICE_URL', 'http://78.31.45.206:8088/ws/');
|
||||||
define ('WEBSERVICE_URI', 'http://78.31.45.206/');
|
define ('WEBSERVICE_URI', 'http://78.31.45.206:8088/');
|
||||||
|
|
||||||
/** INFOGREFFE **/
|
/** INFOGREFFE **/
|
||||||
//define('INFOGREFFE_WS_URL', 'https://wv2rcte.experian.fr/WSContextInfogreffe/INFOGREFFE');
|
//define('INFOGREFFE_WS_URL', 'https://wv2rcte.experian.fr/WSContextInfogreffe/INFOGREFFE');
|
||||||
|
@ -39,15 +39,10 @@ Configuration vhost
|
|||||||
|
|
||||||
<IfModule mod_expires.c>
|
<IfModule mod_expires.c>
|
||||||
ExpiresActive On
|
ExpiresActive On
|
||||||
ExpiresDefault "access plus 1 seconds"
|
ExpiresDefault "access plus 4 hours"
|
||||||
ExpiresByType text/html "access plus 12 hours"
|
|
||||||
ExpiresByType text/xml "access plus 12 hours"
|
|
||||||
ExpiresByType image/gif "access plus 5 days"
|
ExpiresByType image/gif "access plus 5 days"
|
||||||
ExpiresByType image/jpeg "access plus 5 days"
|
ExpiresByType image/jpeg "access plus 5 days"
|
||||||
ExpiresByType image/png "access plus 5 days"
|
ExpiresByType image/png "access plus 5 days"
|
||||||
ExpiresByType text/css "access plus 5 days"
|
|
||||||
ExpiresByType text/javascript "access 5 days"
|
|
||||||
ExpiresByType application/x-javascript "access plus 5 days"
|
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ define ('SITEINST_URL1', 'http://www.scores-decisions.com/');
|
|||||||
define ('SITEINST_URL2', 'http://www.scores-decisions.com/');
|
define ('SITEINST_URL2', 'http://www.scores-decisions.com/');
|
||||||
|
|
||||||
/** Celeste **/
|
/** Celeste **/
|
||||||
define ('WEBSERVICE_URL', 'http://78.31.45.206/ws/');
|
define ('WEBSERVICE_URL', 'http://78.31.45.206:8088/ws/');
|
||||||
define ('WEBSERVICE_URI', 'http://78.31.45.206/');
|
define ('WEBSERVICE_URI', 'http://78.31.45.206:8088/');
|
||||||
|
|
||||||
/** INFOGREFFE **/
|
/** INFOGREFFE **/
|
||||||
//define('INFOGREFFE_WS_URL', 'https://wv2rcte.experian.fr/WSContextInfogreffe/INFOGREFFE');
|
//define('INFOGREFFE_WS_URL', 'https://wv2rcte.experian.fr/WSContextInfogreffe/INFOGREFFE');
|
||||||
|
32
includes/graydon/graydon.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
User profile: SESS38R7
|
||||||
|
Customer no.: 32790
|
||||||
|
Password : E88MSU4
|
||||||
|
https://www.webservices.graydon.co.uk
|
||||||
|
*/
|
||||||
|
|
||||||
|
ini_set('soap.wsdl_cache_enabled', 0);
|
||||||
|
|
||||||
|
require_once realpath(dirname(__FILE__)).'/pays.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_config.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_log.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_error.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_functions.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_format.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_wsfunctions.php';
|
||||||
|
|
||||||
|
//$options = array('trace' => 1);
|
||||||
|
//$options = array('trace' => 1, 'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
$options = array('trace' => 1, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||||
|
// Create a soap client
|
||||||
|
$graydon = new SoapClient(GRAYDON_WSDL, $options);
|
||||||
|
// Create the authentication parameters object
|
||||||
|
$authentication = new StdClass();
|
||||||
|
// Initialise the authentication parameters
|
||||||
|
$authentication->PartnerUserId = USER_PROFILE;
|
||||||
|
$authentication->PartnerPassword = PASSWORD;
|
||||||
|
$authentication->PartnerClientId = '';
|
||||||
|
$authentication->SessionID = '';
|
||||||
|
|
||||||
|
?>
|
17
includes/graydon/graydon_config.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
//Authentification
|
||||||
|
//define('GRAYDON_WSDL' ,'https://www.webservices.graydon.co.uk/CompanyData_webservice/services/SOAPPort/wsdl/GraydonCompanyData.wsdl');
|
||||||
|
define('GRAYDON_WSDL', realpath(dirname(__FILE__)).'/GraydonCompanyData.wsdl');
|
||||||
|
define('USER_PROFILE','SESS38R7');
|
||||||
|
define('PASSWORD','E88MSU4');
|
||||||
|
|
||||||
|
//Delai de mise à jour des informations
|
||||||
|
define('UPDATE_MATCHIDENTIFIERS' , 0);
|
||||||
|
define('UPDATE_PRODUCTS' , 0);
|
||||||
|
define('UPDATE_COUNTRYAVAILABILITY' , 0);
|
||||||
|
define('UPDATE_MATCHMETHODS' , 0);
|
||||||
|
define('UPDATE_IDENTITE' , 0);
|
||||||
|
define('UPDATE_REPORT' , 0);
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ function graydon_mailSoapFault($message){
|
|||||||
$mail->MsgHTML($body);
|
$mail->MsgHTML($body);
|
||||||
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
||||||
if(!$mail->Send()) {
|
if(!$mail->Send()) {
|
||||||
logSoapFault($mail->ErrorInfo);
|
graydon_logSoapFault($mail->ErrorInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,8 +81,6 @@ function graydon_logSoapFault($message){
|
|||||||
echo $message;
|
echo $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function graydon_error($code, $text){
|
function graydon_error($code, $text){
|
||||||
|
|
||||||
$tabError = array(
|
$tabError = array(
|
||||||
|
121
includes/graydon/graydon_functions.php
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Fonctions utiles pour l'utilisation du webservice graydon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function parseReport($type){
|
||||||
|
$doc = new DOMDocument;
|
||||||
|
$doc->preserveWhiteSpace = false;
|
||||||
|
$doc->loadxml($xml);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Parcours le contenu du rapport en XML
|
||||||
|
*
|
||||||
|
* return array
|
||||||
|
*/
|
||||||
|
function parseReportXML($xml)
|
||||||
|
{
|
||||||
|
require_once realpath(dirname(__FILE__)).'/graydon_xml.php';
|
||||||
|
global $firephp;
|
||||||
|
$tabReport = array();
|
||||||
|
global $xpath;
|
||||||
|
$query = '/GraydonUKCompanySchema/CompanyReportPage/CompanyReport';
|
||||||
|
$report = $xpath->query($query);
|
||||||
|
|
||||||
|
//Liste des elements à parser
|
||||||
|
$elements = array( 'Company', 'Name', 'Address', 'Communication', 'Country', 'Credit_Rating',
|
||||||
|
'Date', 'DirectorsDetail', 'Employees', 'Financial_Summary', 'Legal_Form',
|
||||||
|
'Share_CapitalSummary', 'Taxonomy', 'FreeText', 'AccountItem'
|
||||||
|
);
|
||||||
|
foreach($elements as $elementName){
|
||||||
|
//Pour chaque element, nouvelle requete xpath
|
||||||
|
$queryElement = $query.'/'.$elementName;
|
||||||
|
switch($elementName){
|
||||||
|
case "Company" :
|
||||||
|
$tabReport['Company'] = pxmlCompany($queryElement);
|
||||||
|
break;
|
||||||
|
case "Name" :
|
||||||
|
$name = pxmlName($queryElement);
|
||||||
|
if ($name) $tabReport['Name'] = $name;
|
||||||
|
break;
|
||||||
|
case "Address" :
|
||||||
|
$tabReport['Address'] = pxmlAddress($queryElement);
|
||||||
|
break;
|
||||||
|
case "Communication":
|
||||||
|
$tabReport['Communication'] = pxmlCommunication($queryElement);
|
||||||
|
break;
|
||||||
|
case "Country" :
|
||||||
|
$country = pxmlCountry($queryElement);
|
||||||
|
if($country) $tabReport['Country'] = $country;
|
||||||
|
break;
|
||||||
|
case "Credit_Rating" :
|
||||||
|
$creditRating = pxmlCreditRating($queryElement);
|
||||||
|
if($creditRating) $tabReport['CreditRating'] = $creditRating;
|
||||||
|
break;
|
||||||
|
case "Date" :
|
||||||
|
$tabReport['Date'] = pxmlDate($queryElement);
|
||||||
|
break;
|
||||||
|
case "DirectorsDetail" :
|
||||||
|
$directorsdetail = pxmlDirectorsDetail($queryElement);
|
||||||
|
if($directorsdetail){ $tabReport['DirectorsDetail'] = $directorsdetail; }
|
||||||
|
break;
|
||||||
|
case "Employees" :
|
||||||
|
$employees = pxmlEmployees($queryElement);
|
||||||
|
if($employees) $tabReport['Employees'] = $employees;
|
||||||
|
break;
|
||||||
|
case "Financial_Summary" :
|
||||||
|
$financialsummary = pxmlFinancialSummary($queryElement);
|
||||||
|
if($financialsummary) $tabReport['FinancialSummary'] = $financialsummary;
|
||||||
|
break;
|
||||||
|
case "Legal_Form" :
|
||||||
|
$legalform = pxmlLegalForm($queryElement);
|
||||||
|
if($legalform) $tabReport['LegalForm'] = $legalform;
|
||||||
|
break;
|
||||||
|
case "Share_CapitalSummary";
|
||||||
|
$sharecapitalsummary = pxmlShareCapitalSummary($queryElement);
|
||||||
|
if($sharecapitalsummary) $tabReport['ShareCapitalSummary'] = $sharecapitalsummary;
|
||||||
|
break;
|
||||||
|
case "Taxonomy" :
|
||||||
|
$taxonomy = pxmlTaxonomy($queryElement);
|
||||||
|
if($taxonomy) $tabReport['Taxonomy'] = $taxonomy;
|
||||||
|
break;
|
||||||
|
case "FreeText" :
|
||||||
|
$freetext = pxmlFreeText($queryElement);
|
||||||
|
if($freetext) $tabReport['Text'] = $freetext;
|
||||||
|
break;
|
||||||
|
case "AccountItem";
|
||||||
|
$AccountItem = pxmlAccountItem($queryElement);
|
||||||
|
if($AccountItem) $tabReport['AccountItem'] = $AccountItem;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $tabReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseReportHTML()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseReportDOC()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function reportFormat()
|
||||||
|
{
|
||||||
|
return array('xml', 'html');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
1
includes/graydon/graydon_html.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php
|
@ -6,7 +6,8 @@
|
|||||||
* @return string
|
* @return string
|
||||||
* .
|
* .
|
||||||
*/
|
*/
|
||||||
function getCompanyMatchIdentifiers($pays){
|
function getCompanyMatchIdentifiers($pays)
|
||||||
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication;
|
global $page, $mode, $firephp, $graydon, $authentication;
|
||||||
|
|
||||||
$firephp->info('Méthode getCompanyMatchIdentifiers');
|
$firephp->info('Méthode getCompanyMatchIdentifiers');
|
||||||
@ -20,7 +21,8 @@ function getCompanyMatchIdentifiers($pays){
|
|||||||
$matchidentifiers = $q->fetchOne();
|
$matchidentifiers = $q->fetchOne();
|
||||||
|
|
||||||
/** Recup des types d'identifiants pour le pays **/
|
/** Recup des types d'identifiants pour le pays **/
|
||||||
if($matchidentifiers == FALSE){
|
if($matchidentifiers == FALSE)
|
||||||
|
{
|
||||||
//Récupération des intitulés identifiant
|
//Récupération des intitulés identifiant
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
@ -29,6 +31,7 @@ function getCompanyMatchIdentifiers($pays){
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
$result = $graydon->getCompanyMatchIdentifiers($request);
|
$result = $graydon->getCompanyMatchIdentifiers($request);
|
||||||
|
$firephp->log($result,'CompanyMatchIdentifiers');
|
||||||
//Enregistrement de l'action dans les logs
|
//Enregistrement de l'action dans les logs
|
||||||
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
||||||
$sessionID = $result->Service_Log->SessionID;
|
$sessionID = $result->Service_Log->SessionID;
|
||||||
@ -42,12 +45,9 @@ function getCompanyMatchIdentifiers($pays){
|
|||||||
$log->sessionID = $sessionID;
|
$log->sessionID = $sessionID;
|
||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
$count = count($result->CompanyMatchIdentifiers);
|
|
||||||
if ($count>1){
|
$tabIdentifiers = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier[0]->CompanyIdentifier;
|
||||||
$tabIdentifiers = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier->CompanyIdentifier;
|
|
||||||
}elseif($count==1){
|
|
||||||
$tabIdentifiers[] = $result->CompanyMatchIdentifiers->CompanyMatchIdentifier->CompanyIdentifier;
|
|
||||||
}
|
|
||||||
//Stockage du résultat de la méthode en cache
|
//Stockage du résultat de la méthode en cache
|
||||||
$matchidentifiers = new Matchidentifiers();
|
$matchidentifiers = new Matchidentifiers();
|
||||||
$matchidentifiers->country = $pays;
|
$matchidentifiers->country = $pays;
|
||||||
@ -79,8 +79,8 @@ function getCompanyMatchIdentifiers($pays){
|
|||||||
return $tabIdentifiers;
|
return $tabIdentifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCompanyProducts($identifier)
|
||||||
function getCompanyProducts($identifier){
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication;
|
global $page, $mode, $firephp, $graydon, $authentication;
|
||||||
|
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
@ -90,7 +90,6 @@ function getCompanyProducts($identifier){
|
|||||||
|
|
||||||
$companyproducts = new Companyproducts();
|
$companyproducts = new Companyproducts();
|
||||||
$companyproducts = $q->fetchOne();
|
$companyproducts = $q->fetchOne();
|
||||||
$firephp->log($companyproducts->updated_at,'date');
|
|
||||||
$now = mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y"));
|
$now = mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y"));
|
||||||
if($companyproducts == FALSE){
|
if($companyproducts == FALSE){
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
@ -115,14 +114,12 @@ function getCompanyProducts($identifier){
|
|||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
|
|
||||||
$firephp->log($result,'result');
|
|
||||||
|
|
||||||
//Sauvegarde dans la bdd
|
//Sauvegarde dans la bdd
|
||||||
$companyproducts = new Companyproducts();
|
$companyproducts = new Companyproducts();
|
||||||
$companyproducts->identifiers = $identifier;
|
$companyproducts->identifiers = $identifier;
|
||||||
$companyproducts->company = serialize($result->Company);
|
$companyproducts->company = serialize($result->Company);
|
||||||
$companyproducts->products = serialize($result->Products);
|
$companyproducts->products = serialize($result->Products);
|
||||||
$companyproducts->replace();
|
$companyproducts->save();
|
||||||
|
|
||||||
//Extraction
|
//Extraction
|
||||||
$company = $result->Company;
|
$company = $result->Company;
|
||||||
@ -147,7 +144,8 @@ function getCompanyProducts($identifier){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getCompanyMatches($pays){
|
function getCompanyMatches($pays)
|
||||||
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication;
|
global $page, $mode, $firephp, $graydon, $authentication;
|
||||||
|
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
@ -282,7 +280,8 @@ function getCompanyMatches($pays){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getCountryAvailability($pays){
|
function getCountryAvailability($pays)
|
||||||
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication;
|
global $page, $mode, $firephp, $graydon, $authentication;
|
||||||
|
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
@ -292,15 +291,18 @@ function getCountryAvailability($pays){
|
|||||||
|
|
||||||
$countryavailability = new Countryavailability();
|
$countryavailability = new Countryavailability();
|
||||||
$countryavailability = $q->fetchOne();
|
$countryavailability = $q->fetchOne();
|
||||||
if($countryavailability == FALSE){
|
if($countryavailability == FALSE)
|
||||||
|
{
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
// Initialise the request object
|
// Initialise the request object
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
$request->Country = $pays;
|
$request->Country = $pays;
|
||||||
|
$firephp->log($request, 'request');
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$result = $graydon->getCountryAvailability($request);
|
$result = $graydon->getCountryAvailability($request);
|
||||||
|
$firephp->log($result,'CountryAvailability');
|
||||||
//Enregistrement de l'action dans les logs
|
//Enregistrement de l'action dans les logs
|
||||||
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
||||||
$sessionID = $result->Service_Log->SessionID;
|
$sessionID = $result->Service_Log->SessionID;
|
||||||
@ -315,12 +317,7 @@ function getCountryAvailability($pays){
|
|||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
|
|
||||||
$count = count($result->CountryAvailablity->CountryAndProduct->Products->Product);
|
$availability = $result->CountryAvailablity->CountryAndProduct[0]->Products->Product;
|
||||||
if ($count>1){
|
|
||||||
$availability = $result->CountryAvailablity->CountryAndProduct->Products->Product;
|
|
||||||
}elseif($count==1){
|
|
||||||
$availability[] = $result->CountryAvailablity->CountryAndProduct->Products->Product;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Stockage du résultat de la méthode en cache
|
//Stockage du résultat de la méthode en cache
|
||||||
$countryavailability = new Countryavailability();
|
$countryavailability = new Countryavailability();
|
||||||
@ -346,7 +343,8 @@ function getCountryAvailability($pays){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getCompanyMatchMethods($pays){
|
function getCompanyMatchMethods($pays)
|
||||||
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication;
|
global $page, $mode, $firephp, $graydon, $authentication;
|
||||||
|
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
@ -357,7 +355,8 @@ function getCompanyMatchMethods($pays){
|
|||||||
$matchmethods = new Matchmethods();
|
$matchmethods = new Matchmethods();
|
||||||
$matchmethods = $q->fetchOne();
|
$matchmethods = $q->fetchOne();
|
||||||
|
|
||||||
if($matchmethods == FALSE){
|
if($matchmethods == FALSE)
|
||||||
|
{
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
// Initialise the request object
|
// Initialise the request object
|
||||||
@ -379,12 +378,9 @@ function getCompanyMatchMethods($pays){
|
|||||||
$log->sessionID = $sessionID;
|
$log->sessionID = $sessionID;
|
||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
$count = count($result->CompanyMatchMethods->CompanyMatchMethod->MatchMethods->MatchMethod);
|
|
||||||
if ($count>1){
|
$methods = $result->CompanyMatchMethods->CompanyMatchMethod[0]->MatchMethods->MatchMethod;
|
||||||
$methods = $result->CompanyMatchMethods->CompanyMatchMethod->MatchMethods->MatchMethod;
|
|
||||||
}elseif($count==1){
|
|
||||||
$methods[] = $result->CompanyMatchMethods->CompanyMatchMethod->MatchMethods->MatchMethod;
|
|
||||||
}
|
|
||||||
//Stockage du résultat de la méthode en cache
|
//Stockage du résultat de la méthode en cache
|
||||||
$matchmethods = new Matchmethods();
|
$matchmethods = new Matchmethods();
|
||||||
$matchmethods->country = $pays;
|
$matchmethods->country = $pays;
|
||||||
@ -416,7 +412,8 @@ function getCompanyMatchMethods($pays){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getIdentite($CompanyProductIdentifier, $file){
|
function getIdentite($identifier, $CompanyProductIdentifier, $file, $format = 'xml')
|
||||||
|
{
|
||||||
global $page, $mode, $firephp, $graydon, $authentication, $pays;
|
global $page, $mode, $firephp, $graydon, $authentication, $pays;
|
||||||
|
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
@ -444,6 +441,7 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
$firephp->log($pays,'pays');
|
$firephp->log($pays,'pays');
|
||||||
|
|
||||||
//Optention du prix du service
|
//Optention du prix du service
|
||||||
$prix = Doctrine_Query::create()
|
$prix = Doctrine_Query::create()
|
||||||
->select('p.immediate')
|
->select('p.immediate')
|
||||||
@ -451,20 +449,12 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
->leftJoin('p.Country c')
|
->leftJoin('p.Country c')
|
||||||
->where('c.graydon_country = ?', $pays)
|
->where('c.graydon_country = ?', $pays)
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$firephp->log($prix,'prix');
|
|
||||||
|
|
||||||
$q = Doctrine_Query::create()
|
|
||||||
->select('p.immediate')
|
|
||||||
->from('Price p')
|
|
||||||
->leftJoin('p.Country c')
|
|
||||||
->where('c.graydon_country = ?', $pays);
|
|
||||||
$firephp->log($q->getSql(),'SQL');
|
|
||||||
|
|
||||||
|
//Obtention du libelle pays Graydon
|
||||||
$country = Doctrine_Query::create()
|
$country = Doctrine_Query::create()
|
||||||
->from('Country')
|
->from('Country')
|
||||||
->where('graydon_country = ?', $pays)
|
->where('graydon_country = ?', $pays)
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$firephp->log($country,'pays');
|
|
||||||
|
|
||||||
//Enregistrement des commandes dans la bdd
|
//Enregistrement des commandes dans la bdd
|
||||||
$commandes = new Commandes();
|
$commandes = new Commandes();
|
||||||
@ -483,7 +473,7 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
$commandes->Country = $country;
|
$commandes->Country = $country;
|
||||||
$commandes->save();
|
$commandes->save();
|
||||||
|
|
||||||
$mailcommandes = $commandes->toArray();
|
$mailcommandes = $commandes->toString();
|
||||||
$firephp->log($mailcommandes,'dataCommandes');
|
$firephp->log($mailcommandes,'dataCommandes');
|
||||||
$commandes_id = $commandes->id;
|
$commandes_id = $commandes->id;
|
||||||
|
|
||||||
@ -498,7 +488,7 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
$mail->Mailer = "smtp";
|
$mail->Mailer = "smtp";
|
||||||
$mail->Subject = "[International] - (Date :".date("d")."/".date("m")."/".date("Y").") - Commandes";
|
$mail->Subject = "[International] - (Date :".date("d")."/".date("m")."/".date("Y").") - Commandes";
|
||||||
$body = "Commande effectué par ".$_SESSION['tabInfo']['login']."\n";
|
$body = "Commande effectué par ".$_SESSION['tabInfo']['login']."\n";
|
||||||
$body .= print_r($mailcommandes);
|
$body .= $mailcommandes;
|
||||||
$mail->MsgHTML($body);
|
$mail->MsgHTML($body);
|
||||||
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
||||||
$mail->Send();
|
$mail->Send();
|
||||||
@ -518,18 +508,17 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//On vérifie l'état de le demande
|
//On vérifie l'état de le demande
|
||||||
if (isset($placeOrderResult) && $placeOrderResult->OrderStatus->OrderState == 'Completed'){
|
if (isset($placeOrderResult) && $placeOrderResult->OrderStatus->OrderState == 'Completed')
|
||||||
|
{
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
$request->LanguageCode = 'E'; //Spécifier la langue du rapport
|
$request->LanguageCode = 'E'; //Spécifier la langue du rapport
|
||||||
$request->OrderReference = $placeOrderResult->OrderStatus->OrderReference;
|
$request->OrderReference = $placeOrderResult->OrderStatus->OrderReference;
|
||||||
$request->MimeType = 'xml';
|
$request->MimeType = $format;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$reportResult = $graydon->getCompanyReport($request);
|
$reportResult = $graydon->getCompanyReport($request);
|
||||||
|
$firephp->log($reportResult, 'CompanyReport');
|
||||||
//Enregistrement de l'action dans les logs
|
//Enregistrement de l'action dans les logs
|
||||||
$transactionIdentifier = $reportResult->Service_Log->TransactionIdentifier;
|
$transactionIdentifier = $reportResult->Service_Log->TransactionIdentifier;
|
||||||
$sessionID = $reportResult->Service_Log->SessionID;
|
$sessionID = $reportResult->Service_Log->SessionID;
|
||||||
@ -545,22 +534,24 @@ function getIdentite($CompanyProductIdentifier, $file){
|
|||||||
$log->mode = $mode;
|
$log->mode = $mode;
|
||||||
$log->save();
|
$log->save();
|
||||||
|
|
||||||
|
//Suivant le format, on recupere le bon objet
|
||||||
$firephp->log($reportResult,'reportResult');
|
$firephp->log($reportResult,'reportResult');
|
||||||
$xml = $reportResult->ReportXML->any;
|
if($format == 'xml') $content = $reportResult->ReportXML->any;
|
||||||
|
if($format == 'html') $content = $reportResult->ReportText;
|
||||||
|
|
||||||
//Enregistrement du fichier xml
|
//Enregistrement du contenu dans un fichier
|
||||||
file_put_contents($file, $xml);
|
file_put_contents($file, $content);
|
||||||
|
|
||||||
//Mise en cache dans la bdd
|
//Mise en cache dans la bdd
|
||||||
$report = new Report();
|
$report = new Report();
|
||||||
$report->identifier = $identifier;
|
$report->identifier = $identifier;
|
||||||
$report->name = $_SESSION['graydon']['name'];
|
$report->name = $_SESSION['graydon']['name'];
|
||||||
$report->content = $xml;
|
$report->content = $content;
|
||||||
$report->format = 'xml';
|
$report->format = $format;
|
||||||
$report->order_id = $commandes_id;
|
$report->order_id = $commandes_id;
|
||||||
$report->save();
|
$report->save();
|
||||||
|
|
||||||
return $xml;
|
return $content;
|
||||||
|
|
||||||
}catch( SoapFault $fault ){
|
}catch( SoapFault $fault ){
|
||||||
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
||||||
@ -635,7 +626,7 @@ function setEnquete($pays){
|
|||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
if(!isset($_REQUEST['pidentifier'])){
|
if(!isset($_REQUEST['pidentifier'])){
|
||||||
$request->OrderCreatorEmail = 'mricois@scores-decisions.com';
|
$request->OrderCreatorEmail = EMAIL_SUPPORTDEV;
|
||||||
$request->Order->LanguageCode = 'F';
|
$request->Order->LanguageCode = 'F';
|
||||||
$request->Order->Name = $_REQUEST['InfoEnq']['Name'];
|
$request->Order->Name = $_REQUEST['InfoEnq']['Name'];
|
||||||
$request->Order->ServiceSpeed = $_REQUEST['InfoEnq']['Servicespeed'];
|
$request->Order->ServiceSpeed = $_REQUEST['InfoEnq']['Servicespeed'];
|
@ -1,97 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* Fonctions utiles pour l'utilisation du webservice graydon
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
function parseReport($type){
|
|
||||||
$doc = new DOMDocument;
|
|
||||||
$doc->preserveWhiteSpace = false;
|
|
||||||
$doc->loadxml($xml);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Parcours le contenu du rapport en XML
|
|
||||||
*
|
|
||||||
* return array
|
|
||||||
*/
|
|
||||||
function parseReportXML($xml){
|
|
||||||
global $firephp;
|
|
||||||
$tabReport = array();
|
|
||||||
global $xpath;
|
|
||||||
$query = '/GraydonUKCompanySchema/CompanyReportPage/CompanyReport';
|
|
||||||
$report = $xpath->query($query);
|
|
||||||
|
|
||||||
//Liste des elements à parser
|
|
||||||
$elements = array( 'Company', 'Name', 'Address', 'Communication', 'Country', 'Credit_Rating',
|
|
||||||
'Date', 'DirectorsDetail', 'Employees', 'Financial_Summary', 'Legal_Form',
|
|
||||||
'Share_CapitalSummary', 'Taxonomy', 'FreeText', 'AccountItem'
|
|
||||||
);
|
|
||||||
foreach($elements as $elementName){
|
|
||||||
//Pour chaque element, nouvelle requete xpath
|
|
||||||
$queryElement = $query.'/'.$elementName;
|
|
||||||
switch($elementName){
|
|
||||||
case "Company" :
|
|
||||||
$tabReport['Company'] = pxmlCompany($queryElement);
|
|
||||||
break;
|
|
||||||
case "Name" :
|
|
||||||
$name = pxmlName($queryElement);
|
|
||||||
if ($name) $tabReport['Name'] = $name;
|
|
||||||
break;
|
|
||||||
case "Address" :
|
|
||||||
$tabReport['Address'] = pxmlAddress($queryElement);
|
|
||||||
break;
|
|
||||||
case "Communication":
|
|
||||||
$tabReport['Communication'] = pxmlCommunication($queryElement);
|
|
||||||
break;
|
|
||||||
case "Country" :
|
|
||||||
$country = pxmlCountry($queryElement);
|
|
||||||
if($country) $tabReport['Country'] = $country;
|
|
||||||
break;
|
|
||||||
case "Credit_Rating" :
|
|
||||||
$creditRating = pxmlCreditRating($queryElement);
|
|
||||||
if($creditRating) $tabReport['CreditRating'] = $creditRating;
|
|
||||||
break;
|
|
||||||
case "Date" :
|
|
||||||
$tabReport['Date'] = pxmlDate($queryElement);
|
|
||||||
break;
|
|
||||||
case "DirectorsDetail" :
|
|
||||||
$directorsdetail = pxmlDirectorsDetail($queryElement);
|
|
||||||
if($directorsdetail){ $tabReport['DirectorsDetail'] = $directorsdetail; }
|
|
||||||
break;
|
|
||||||
case "Employees" :
|
|
||||||
$employees = pxmlEmployees($queryElement);
|
|
||||||
if($employees) $tabReport['Employees'] = $employees;
|
|
||||||
break;
|
|
||||||
case "Financial_Summary" :
|
|
||||||
$financialsummary = pxmlFinancialSummary($queryElement);
|
|
||||||
if($financialsummary) $tabReport['FinancialSummary'] = $financialsummary;
|
|
||||||
break;
|
|
||||||
case "Legal_Form" :
|
|
||||||
$legalform = pxmlLegalForm($queryElement);
|
|
||||||
if($legalform) $tabReport['LegalForm'] = $legalform;
|
|
||||||
break;
|
|
||||||
case "Share_CapitalSummary";
|
|
||||||
$sharecapitalsummary = pxmlShareCapitalSummary($queryElement);
|
|
||||||
if($sharecapitalsummary) $tabReport['ShareCapitalSummary'] = $sharecapitalsummary;
|
|
||||||
break;
|
|
||||||
case "Taxonomy" :
|
|
||||||
$taxonomy = pxmlTaxonomy($queryElement);
|
|
||||||
if($taxonomy) $tabReport['Taxonomy'] = $taxonomy;
|
|
||||||
break;
|
|
||||||
case "FreeText" :
|
|
||||||
$freetext = pxmlFreeText($queryElement);
|
|
||||||
if($freetext) $tabReport['Text'] = $freetext;
|
|
||||||
break;
|
|
||||||
case "AccountItem";
|
|
||||||
$AccountItem = pxmlAccountItem($queryElement);
|
|
||||||
if($AccountItem) $tabReport['AccountItem'] = $AccountItem;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $tabReport;
|
|
||||||
}
|
|
||||||
|
|
||||||
function pxmlCompany($query){
|
function pxmlCompany($query){
|
||||||
global $xpath;
|
global $xpath;
|
||||||
@ -587,14 +494,3 @@ function pxmlAmount($query){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseReportHTML(){}
|
|
||||||
|
|
||||||
function parseReportDOC(){}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
User profile: SESS38R7
|
|
||||||
Customer no.: 32790
|
|
||||||
Password : E88MSU4
|
|
||||||
|
|
||||||
https://www.webservices.graydon.co.uk
|
|
||||||
*/
|
|
||||||
|
|
||||||
ini_set('soap.wsdl_cache_enabled', 0);
|
|
||||||
//define('GRAYDON_WSDL' ,'https://www.webservices.graydon.co.uk/CompanyData_webservice/services/SOAPPort/wsdl/GraydonCompanyData.wsdl');
|
|
||||||
define('GRAYDON_WSDL', realpath(dirname(__FILE__)).'/GraydonCompanyData.wsdl');
|
|
||||||
define('USER_PROFILE','SESS38R7');
|
|
||||||
define('PASSWORD','E88MSU4');
|
|
||||||
|
|
||||||
require_once realpath(dirname(__FILE__)).'/wsfunctions.php';
|
|
||||||
|
|
||||||
$options = array('trace' => 1);
|
|
||||||
//$options = array('trace' => 1, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
|
|
||||||
// SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS
|
|
||||||
// Create a soap client
|
|
||||||
$graydon = new SoapClient(GRAYDON_WSDL, $options);
|
|
||||||
// Create the authentication parameters object
|
|
||||||
$authentication = new StdClass();
|
|
||||||
// Initialise the authentication parameters
|
|
||||||
$authentication->PartnerUserId = USER_PROFILE;
|
|
||||||
$authentication->PartnerPassword = PASSWORD;
|
|
||||||
$authentication->PartnerClientId = '';
|
|
||||||
$authentication->SessionID = '';
|
|
||||||
|
|
||||||
?>
|
|
83
includes/liasse/bilan_assurance.php
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<h2>Bilan d'assurance - <?=substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3)?></h2>
|
||||||
|
<style>
|
||||||
|
.bilan_assurance { width:100%; border-collapse: collapse; }
|
||||||
|
.bilan_assurance td { border:1px solid black; padding:5px; }
|
||||||
|
.bilan_assurance td.bold { font-weight:bold; }
|
||||||
|
</style>
|
||||||
|
<table class="bilan_assurance">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Montants exprimés en :</td>
|
||||||
|
<td align="right"><?=$tabBilan['MONNAIE']?></td>
|
||||||
|
<td align="right"><?=$tabBilan['MONNAIE']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Exercices, clos le :</td>
|
||||||
|
<td align="right"><?=Wdate::dateT('Ymd', 'd/m/Y',$tabBilan['DATE_CLOTURE'])?></td>
|
||||||
|
<td align="right"><?=Wdate::dateT('Ymd', 'd/m/Y',$tabBilan['DATE_CLOTURE_PRE'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Durée des exercices :</td>
|
||||||
|
<td align="right"><?=$tabBilan['DUREE_MOIS']?> mois</td>
|
||||||
|
<td align="right"><?=$tabBilan['DUREE_MOIS_PRE']?> mois</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4" class="bold">ACTIF</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Placements</td>
|
||||||
|
<td align="center">AA1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AA1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NA1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bold">TOTAL ACTIF</td>
|
||||||
|
<td align="center">AA2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AA2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NA2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4" class="bold">PASSIF</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Capitaux propres</td>
|
||||||
|
<td align="center">AP1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AP1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Provisions techniques brutes</td>
|
||||||
|
<td align="center">AP2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AP2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bold">TOTAL PASSIF</td>
|
||||||
|
<td align="center">AP3</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AP3'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP3'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4" class="bold">COMPTE DE RESULTAT</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Primes - cotisations acquises</td>
|
||||||
|
<td align="center">AR1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AR1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Charges des sinistres</td>
|
||||||
|
<td align="center">AR2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AR2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Résultat technique</td>
|
||||||
|
<td align="center">AR3</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AR3'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR3'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Résultat de l'exercice</td>
|
||||||
|
<td align="center">AR4</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['AR4'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR4'])?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php
|
120
includes/liasse/bilan_banque.php
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<h2>Bilan de banque - <?=substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3)?></h2>
|
||||||
|
<style>
|
||||||
|
.bilan_banque { width:100%; border-collapse: collapse; }
|
||||||
|
.bilan_banque td { border:1px solid black; padding:5px; }
|
||||||
|
.bilan_banque td.bold { font-weight:bold; }
|
||||||
|
</style>
|
||||||
|
<table class="bilan_banque">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Montants exprimés en :</td>
|
||||||
|
<td align="right"><?=$tabBilan['MONNAIE']?></td>
|
||||||
|
<td align="right"><?=$tabBilan['MONNAIE']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Exercices, clos le :</td>
|
||||||
|
<td align="right"><?=Wdate::dateT('Ymd', 'd/m/Y',$tabBilan['DATE_CLOTURE'])?></td>
|
||||||
|
<td align="right"><?=Wdate::dateT('Ymd', 'd/m/Y',$tabBilan['DATE_CLOTURE_PRE'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" colspan="2">Durée des exercices :</td>
|
||||||
|
<td align="right"><?=$tabBilan['DUREE_MOIS'];?> mois</td>
|
||||||
|
<td align="right"><?=$tabBilan['DUREE_MOIS_PRE'];?> mois</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr><td colspan="4" class="bold">ACTIF</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Créances sur les établissements de crédit</td>
|
||||||
|
<td align="center">BA1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BA1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NA1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Créances sur la clientèle</td>
|
||||||
|
<td align="center">BA2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BA2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NA2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bold">TOTAL ACTIF</td>
|
||||||
|
<td align="center">BA3</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BA3'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NA3'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4" class="bold">PASSIF</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Dettes envers les établissements de crédit</td>
|
||||||
|
<td align="center">BP1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Comptes créditeurs à la clientèle</td>
|
||||||
|
<td align="center">BP2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Capital souscrit</td>
|
||||||
|
<td align="center">BP3</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP3'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP3'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Primes d'émissions</td>
|
||||||
|
<td align="center">BP4</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP4'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP4'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Réserves</td>
|
||||||
|
<td align="center">BP5</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP5'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP5'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Ecarts de réevaluation</td>
|
||||||
|
<td align="center">BP6</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP6'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP6'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Report à nouveau</td>
|
||||||
|
<td align="center">BP7</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP7'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP7'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Résultat de l'exercice</td>
|
||||||
|
<td align="center">BP8</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP8'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP8'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bold">TOTAL PASSIF</td>
|
||||||
|
<td align="center">BP9</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BP9'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NP9'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="4" class="bold">COMPTE DE RESULTAT</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>Intérêts et produits assimilés</td>
|
||||||
|
<td align="center">BR1</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BR1'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR1'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Intérêts et charges assimilées</td>
|
||||||
|
<td align="center">BR2</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BR2'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR2'])?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Résultat de l'exercice</td>
|
||||||
|
<td align="center">BR3</td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['BR3'])?></td>
|
||||||
|
<td align="right"><?=bilanMonnaie($tabBilan['NR3'])?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php
|
3079
includes/liasse/bilan_normal.php
Normal file
350
includes/liasse/bilan_simplifie.php
Normal file
@ -0,0 +1,350 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
||||||
|
<span>Actif</span>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td colspan="2">Brut</td>
|
||||||
|
<td colspan="2">Amortissements, provisions</td>
|
||||||
|
<td>Net</td>
|
||||||
|
<td>Net</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="5">ACTIF IMMOBILISÉ</td>
|
||||||
|
<td rowspan="2">Immobilisations incorporelles</td>
|
||||||
|
<td>Fonds Commercial</td>
|
||||||
|
<td>010</td>
|
||||||
|
<td></td>
|
||||||
|
<td>012</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Autres</td>
|
||||||
|
<td>014</td>
|
||||||
|
<td></td>
|
||||||
|
<td>016</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Immobilisations corporelles</td>
|
||||||
|
<td>028</td>
|
||||||
|
<td></td>
|
||||||
|
<td>030</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Immobilisations financières</td>
|
||||||
|
<td>040</td>
|
||||||
|
<td></td>
|
||||||
|
<td>042</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Total I</td>
|
||||||
|
<td>044</td>
|
||||||
|
<td></td>
|
||||||
|
<td>048</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="8">ACTIF CIRCULANT</td>
|
||||||
|
<td rowspan="2">STOCKS</td>
|
||||||
|
<td>Matières premières, approvisionnements, en cours de production</td>
|
||||||
|
<td>050</td>
|
||||||
|
<td></td>
|
||||||
|
<td>052</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Marchandises</td>
|
||||||
|
<td>060</td>
|
||||||
|
<td></td>
|
||||||
|
<td>062</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Avances et acomptes versés sur commandes</td>
|
||||||
|
<td>064</td>
|
||||||
|
<td></td>
|
||||||
|
<td>066</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2">CRÉANCES</td>
|
||||||
|
<td>Clients et comptes rattachés</td>
|
||||||
|
<td>068</td>
|
||||||
|
<td></td>
|
||||||
|
<td>070</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Autres</td>
|
||||||
|
<td>072</td>
|
||||||
|
<td></td>
|
||||||
|
<td>074</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Valeurs mobilières de placement</td>
|
||||||
|
<td>080</td>
|
||||||
|
<td></td>
|
||||||
|
<td>082</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Disponibilités</td>
|
||||||
|
<td>084</td>
|
||||||
|
<td></td>
|
||||||
|
<td>086</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Caisse</td>
|
||||||
|
<td>088</td>
|
||||||
|
<td></td>
|
||||||
|
<td>090</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">Charges constatées d'avance</td>
|
||||||
|
<td>092</td>
|
||||||
|
<td></td>
|
||||||
|
<td>094</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">Total II</td>
|
||||||
|
<td>096</td>
|
||||||
|
<td></td>
|
||||||
|
<td>098</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">Total général (I + II)</td>
|
||||||
|
<td>110</td>
|
||||||
|
<td></td>
|
||||||
|
<td>112</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<span>PASSIF</span>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td colspan="2">Exercice N</td>
|
||||||
|
<td colspan="2">Exercice N-1</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="9">CAPITAUX PROPORES</td>
|
||||||
|
<td colspan="3">Capital social ou individuel</td>
|
||||||
|
<td>120</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Ecart de réévaluation</td>
|
||||||
|
<td>124</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Réserve légale</td>
|
||||||
|
<td>126</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Réserve réglementées</td>
|
||||||
|
<td>129</td>
|
||||||
|
<td></td>
|
||||||
|
<td>130</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Autres réserves</td>
|
||||||
|
<td>131</td>
|
||||||
|
<td></td>
|
||||||
|
<td>132</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Report à nouveau</td>
|
||||||
|
<td>134</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Résultat de l'exercice</td>
|
||||||
|
<td>136</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Provisions réglementées</td>
|
||||||
|
<td>140</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Total I</td>
|
||||||
|
<td>142</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Provisions pour risques et charges</td>
|
||||||
|
<td colspan="2">Total II</td>
|
||||||
|
<td>154</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="4">DETTES</td>
|
||||||
|
<td colspan="3">Emprunts et dettes assimilées</td>
|
||||||
|
<td>156</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Avances et acomptes reçus sur commandes en cours</td>
|
||||||
|
<td>164</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Fournisseurs et comptes rattachés</td>
|
||||||
|
<td>166</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Autres dettes (dont comptes courants d'associés)</td>
|
||||||
|
<td>169</td>
|
||||||
|
<td></td>
|
||||||
|
<td>172</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Produits constatés d'avance</td>
|
||||||
|
<td>174</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Total III</td>
|
||||||
|
<td>176</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Total général ( I + II + III)</td>
|
||||||
|
<td>180</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="3">RENVOIS</td>
|
||||||
|
<td>(1)</td>
|
||||||
|
<td>Dont immobilisations financière à moins d'un an</td>
|
||||||
|
<td>193</td>
|
||||||
|
<td></td>
|
||||||
|
<td>(4)</td>
|
||||||
|
<td>Dont dettes à plus d'un an</td>
|
||||||
|
<td>195</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>(2)</td>
|
||||||
|
<td>Dont créances à plus d'un an</td>
|
||||||
|
<td>197</td>
|
||||||
|
<td></td>
|
||||||
|
<td>(5)</td>
|
||||||
|
<td>Coût de revient des immobilisations acquises ou créees au cours de l'exercice</td>
|
||||||
|
<td>182</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<span>COMPTE DE RÉSULTAT</span>
|
||||||
|
|
152
includes/liasse/liasse.php
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
<?php
|
||||||
|
function bilanSimplifie2Normal($bilanRS) {
|
||||||
|
$tabBS2BN=array('AH'=>'010',
|
||||||
|
'AI'=>'012',
|
||||||
|
'AJ'=>'014',
|
||||||
|
'AK'=>'016',
|
||||||
|
'AT'=>'028',
|
||||||
|
'AU'=>'030',
|
||||||
|
'BH'=>'040',
|
||||||
|
'BI'=>'042',
|
||||||
|
'BJ'=>'044',
|
||||||
|
'BK'=>'048',
|
||||||
|
'BT'=>'060',
|
||||||
|
'BU'=>'062',
|
||||||
|
'BV'=>'064',
|
||||||
|
'BW'=>'066',
|
||||||
|
'BX'=>'068',
|
||||||
|
'BY'=>'070',
|
||||||
|
'BZ'=>'072',
|
||||||
|
'CA'=>'074',
|
||||||
|
'CD'=>'080',
|
||||||
|
'CE'=>'082',
|
||||||
|
'CF'=>'084',
|
||||||
|
'CG'=>'086',
|
||||||
|
'CH'=>'092',
|
||||||
|
'CI'=>'094',
|
||||||
|
'CJ'=>'096',
|
||||||
|
'CK'=>'098',
|
||||||
|
'CO'=>'110',
|
||||||
|
'1A'=>'112',
|
||||||
|
'DA'=>'120',
|
||||||
|
'DC'=>'124',
|
||||||
|
'DD'=>'126',
|
||||||
|
'DF'=>'130',
|
||||||
|
'DG'=>'132',
|
||||||
|
'DH'=>'134',
|
||||||
|
'DI'=>'136',
|
||||||
|
'DK'=>'140',
|
||||||
|
'DL'=>'142',
|
||||||
|
'DR'=>'154',
|
||||||
|
'DP'=>'154',
|
||||||
|
'DU'=>'156',
|
||||||
|
'DV'=>'169',
|
||||||
|
'DW'=>'164',
|
||||||
|
'DX'=>'166',
|
||||||
|
'EA'=>'172-169',
|
||||||
|
'EB'=>'174',
|
||||||
|
'EC'=>'176',
|
||||||
|
'EE'=>'180',
|
||||||
|
'EH'=>'156-195',
|
||||||
|
'FA'=>'210-209',
|
||||||
|
'FB'=>'209',
|
||||||
|
'FC'=>'210',
|
||||||
|
'FD'=>'214-215',
|
||||||
|
'FE'=>'215',
|
||||||
|
'FF'=>'214',
|
||||||
|
'FH'=>'217',
|
||||||
|
'FI'=>'218',
|
||||||
|
'FK'=>'209+215+217',
|
||||||
|
'FL'=>'210+214+218',
|
||||||
|
'FM'=>'222',
|
||||||
|
'FN'=>'224',
|
||||||
|
'FO'=>'226',
|
||||||
|
'FQ'=>'230',
|
||||||
|
'FR'=>'232',
|
||||||
|
'FS'=>'234',
|
||||||
|
'FT'=>'236',
|
||||||
|
'FU'=>'238',
|
||||||
|
'FV'=>'240',
|
||||||
|
'FW'=>'242',
|
||||||
|
'FX'=>'244',
|
||||||
|
'FY'=>'250',
|
||||||
|
'FZ'=>'252',
|
||||||
|
'GA'=>'254',
|
||||||
|
'GE'=>'262',
|
||||||
|
'GF'=>'264',
|
||||||
|
'GG'=>'270',
|
||||||
|
'GP'=>'280',
|
||||||
|
'GU'=>'294',
|
||||||
|
'GW'=>'270+280+294',
|
||||||
|
'HD'=>'290',
|
||||||
|
'HH'=>'300',
|
||||||
|
'HI'=>'290-300',
|
||||||
|
'HK'=>'306',
|
||||||
|
'HL'=>'232+280+290',
|
||||||
|
'HM'=>'264+294+300+306',
|
||||||
|
'HN'=>'310',
|
||||||
|
'YY'=>'374',
|
||||||
|
'YZ'=>'378',
|
||||||
|
'YP'=>'376',
|
||||||
|
);
|
||||||
|
|
||||||
|
$bilanRN=array();
|
||||||
|
foreach ($tabBS2BN as $posteRN => $formule) {
|
||||||
|
if (preg_match('/\+|\-/', $formule)) {
|
||||||
|
$tabTmp=preg_split('/\+|\-/', $formule, -1, PREG_SPLIT_OFFSET_CAPTURE);
|
||||||
|
//$bilanRN[$posteRN]=0;
|
||||||
|
$scalc='';
|
||||||
|
foreach ($tabTmp as $i=>$tab) {
|
||||||
|
if ($i==0) {
|
||||||
|
$bilanRN[$posteRN]=$bilanRS[$tab[0]];
|
||||||
|
$scalc.=$bilanRS[$tab[0]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$signe=$formule[$tab[1]-1];
|
||||||
|
$scalc.=$signe;
|
||||||
|
if ($signe=='+') $bilanRN[$posteRN]+=$bilanRS[$tab[0]];
|
||||||
|
elseif ($signe=='-') $bilanRN[$posteRN]-=$bilanRS[$tab[0]];
|
||||||
|
$scalc.=$bilanRS[$tab[0]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$bilanRN[$posteRN]=$bilanRN[$posteRN];
|
||||||
|
}
|
||||||
|
else $bilanRN[$posteRN]=$bilanRS[$formule];
|
||||||
|
}
|
||||||
|
if ($bilanRS['240']<>0) {
|
||||||
|
$bilanRN['BL']=$bilanRS['050'];
|
||||||
|
$bilanRN['BM']=$bilanRS['052'];
|
||||||
|
} else {
|
||||||
|
$bilanRN['BN']=$bilanRS['050'];
|
||||||
|
$bilanRN['BO']=$bilanRS['052'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($bilanRS['070']<>0 || $bilanRS['074']<>0 || $bilanRS['052']<>0 || $bilanRS['062']<>0)
|
||||||
|
$bilanRN['GC']=$bilanRS['256'];
|
||||||
|
elseif ($bilanRS['070']==0 && $bilanRS['074']==0 && $bilanRS['052']==0 && $bilanRS['062']==0 && $bilanRS['254']<>0)
|
||||||
|
$bilanRN['GD']=$bilanRS['256'];
|
||||||
|
|
||||||
|
if ($bilanRS['584']<>0) {
|
||||||
|
$bilanRN['HB']=$bilanRS['584'];
|
||||||
|
$bilanRN['HA']=$bilanRS['290']-$bilanRS['584'];
|
||||||
|
} else
|
||||||
|
$bilanRN['HA']=$bilanRS['290'];
|
||||||
|
|
||||||
|
if ($bilanRS['582']<>0) {
|
||||||
|
$bilanRN['HF']=$bilanRS['582'];
|
||||||
|
$bilanRN['HE']=$bilanRS['582']-$bilanRS['300'];
|
||||||
|
} else
|
||||||
|
$bilanRN['HE']=$bilanRS['300'];
|
||||||
|
|
||||||
|
return $bilanRN;
|
||||||
|
}
|
||||||
|
|
||||||
|
function bilanMonnaie($value)
|
||||||
|
{
|
||||||
|
if(isset($value) && !empty($value)){
|
||||||
|
return number_format($value, 0, ',', ' ');
|
||||||
|
}else{
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
88
includes/logos/logos.php
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function getLogo($siteWeb, $siren)
|
||||||
|
{
|
||||||
|
global $firephp;
|
||||||
|
$img = false;
|
||||||
|
require_once 'common/curl.php';
|
||||||
|
if (substr($siteWeb,-1)!='/') $siteWeb.='/';
|
||||||
|
|
||||||
|
$arrUrl = parse_url($siteWeb);
|
||||||
|
$page = getUrl($siteWeb, '', '', '', false, $arrUrl['host'], '', 3);
|
||||||
|
$body = $page['body'];
|
||||||
|
if (preg_match('/<img(?:.*)src=(?:"|\')((?:.*)logo(?:.*)(?:gif|png|jpg|jpeg))/Ui', $body, $matches)) {
|
||||||
|
$logo = trim(strtr($matches[1],'"\'',' '));
|
||||||
|
$urlLogo = $siteWeb.$logo;
|
||||||
|
|
||||||
|
$tmp = explode('.', basename($logo));
|
||||||
|
$ext = end($tmp);
|
||||||
|
|
||||||
|
$page = getUrl($urlLogo, '', '', $siteWeb, false, $arrUrl['host']);
|
||||||
|
$firephp->log($page,'page');
|
||||||
|
if($page['code']!=400)
|
||||||
|
{
|
||||||
|
$body = $page['body'];
|
||||||
|
$fp = fopen(PATH_LOGOS.$siren.'.'.$ext, 'a');
|
||||||
|
fwrite($fp, $body);
|
||||||
|
fclose($fp);
|
||||||
|
$img = $siren.'.'.$ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $img;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function logo_exist($siren, $isin = '', $web = '')
|
||||||
|
{
|
||||||
|
global $firephp;
|
||||||
|
$img_ext = array('gif', 'png', 'jpg', 'jpeg');
|
||||||
|
$urlImg = '';
|
||||||
|
|
||||||
|
// Recherche le logo avec le siren
|
||||||
|
$locImg = PATH_LOGOS.$siren;
|
||||||
|
foreach($img_ext as $extension)
|
||||||
|
{
|
||||||
|
if( file_exists($locImg.'.'.$extension) )
|
||||||
|
{
|
||||||
|
$urlImg = './logos/'.$siren.'.'.$extension;
|
||||||
|
$ext = '.'.$extension;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Recherche de logos avec le code isin
|
||||||
|
if($urlImg=='' && $isin!='')
|
||||||
|
{
|
||||||
|
$locImg=PATH_LOGOS.$isin;
|
||||||
|
foreach($img_ext as $extension)
|
||||||
|
{
|
||||||
|
if( file_exists($locImg.'.'.$extension) )
|
||||||
|
{
|
||||||
|
$urlImg = './logos/'.$isin.'.'.$extension;
|
||||||
|
$ext = '.'.$extension;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( trim($web)!='' && $urlImg=='' )
|
||||||
|
{
|
||||||
|
$login = array('ylenaour', 'mpurcarin', 'mcochet', 'aegasse', 'jmartory', 'mricois');
|
||||||
|
$locImg = '';
|
||||||
|
if (substr($web,0,7)!='http://') $siteWeb = 'http://'.$web;
|
||||||
|
else $siteWeb = $web;
|
||||||
|
|
||||||
|
if ( in_array($_SESSION['tabInfo']['login'], $login) )
|
||||||
|
{
|
||||||
|
$img = getLogo($siteWeb, $siren);
|
||||||
|
$firephp->log($img, 'image');
|
||||||
|
if($img!==false)
|
||||||
|
{
|
||||||
|
$urlImg = './logos/'.$img;
|
||||||
|
list($locImg, $ext) = explode('.', $img);
|
||||||
|
$ext = '.'.$ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array($urlImg, $locImg.$ext);
|
||||||
|
}
|
||||||
|
|
597
includes/menu/menu.php
Normal file
@ -0,0 +1,597 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$menu = array();
|
||||||
|
|
||||||
|
// Recherche
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Rechercher une entreprise',
|
||||||
|
'href' => 'menu_href_recherche_ent');
|
||||||
|
$children[] = array('data' => 'Rechercher par dirigeant',
|
||||||
|
'href' => 'menu_href_recherche_dir');
|
||||||
|
$children[] = array('data' => 'Recherche Internationale',
|
||||||
|
'href' => 'menu_href_international',
|
||||||
|
'perm' => array( 'name'=>'INTERNATIONAL', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Rechercher une annonce',
|
||||||
|
'href' => 'menu_href_annonce');
|
||||||
|
$children[] = array('data' => 'Dernière recherche',
|
||||||
|
'href' => 'menu_href_list_pre');
|
||||||
|
$children[] = array('data' => 'Liste des dernières recherches',
|
||||||
|
'href' => 'menu_href_list_derniere_recherche');
|
||||||
|
$children[] = array('data' => 'Centrale IparI ©',
|
||||||
|
'href' => 'menu_href_ipari',
|
||||||
|
'perm' => array( 'name'=>'IPARI', 'hidden'=>true ) );
|
||||||
|
$menu[] = array( 'data'=> 'RECHERCHES', 'children'=>$children );
|
||||||
|
|
||||||
|
// Identité
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Fiche d\'identité',
|
||||||
|
'href' => 'menu_href_identite');
|
||||||
|
$children[] = array('data' => 'Liste des établissements',
|
||||||
|
'href' => 'menu_href_etablissement' );
|
||||||
|
$children[] = array('data' => 'Liens inter-entreprise',
|
||||||
|
'href' => 'menu_href_lienentreprise');
|
||||||
|
$children[] = array('data' => 'Modifications Insee',
|
||||||
|
'href' => 'menu_href_insee',
|
||||||
|
'perm' => array( 'name'=>'EVENINSEE', 'hidden'=>true ) );
|
||||||
|
$menu[] = array( 'data'=>'IDENTITÉ', 'children'=>$children);
|
||||||
|
|
||||||
|
// Dirigeants
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Liste des dirigeants',
|
||||||
|
'href' => 'menu_href_dirigeants');
|
||||||
|
$children[] = array('data' => 'Historique des dirigeants',
|
||||||
|
'href' => 'menu_href_histodirigeants');
|
||||||
|
$menu[] = array( 'data'=>'DIRIGEANTS', 'children'=>$children);
|
||||||
|
|
||||||
|
// ELEMENTS FINANCIERS
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Synthèse',
|
||||||
|
'href' => 'menu_href_synthese');
|
||||||
|
$children[] = array('data' => 'Bilans, Compte de résultat',
|
||||||
|
'href' => 'menu_href_bilans');
|
||||||
|
$children[] = array('data' => 'Ratios',
|
||||||
|
'href' => 'menu_href_ratios');
|
||||||
|
$children[] = array('data' => 'Liasse fiscale',
|
||||||
|
'href' => 'menu_href_liasse');
|
||||||
|
$children[] = array('data' => 'Bourse & Cotations',
|
||||||
|
'href' => 'menu_href_bourse');
|
||||||
|
$children[] = array('data' => 'Relations bancaires',
|
||||||
|
'href' => 'menu_href_banque');
|
||||||
|
$menu[] = array( 'data'=>'ELEMENTS FINANCIERS', 'children'=>$children);
|
||||||
|
|
||||||
|
// Elements juridiques
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Annonces Légales',
|
||||||
|
'href' => 'menu_href_annonces');
|
||||||
|
$children[] = array('data' => 'Information Règlementée',
|
||||||
|
'href' => 'menu_href_infosreg');
|
||||||
|
$children[] = array('data' => 'Compétences Territoriales',
|
||||||
|
'href' => 'menu_href_competences');
|
||||||
|
$children[] = array('data' => 'Conventions collectives',
|
||||||
|
'href' => 'menu_href_conventions');
|
||||||
|
$children[] = array('data' => 'Marques déposées',
|
||||||
|
'href' => 'menu_href_marques',
|
||||||
|
'perm' => array( 'name'=>'MARQUES', 'hidden'=>true ) );
|
||||||
|
$menu[] = array( 'data'=>'ELEMENTS JURIDIQUES', 'children'=>$children);
|
||||||
|
|
||||||
|
// Evaluation
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'IndiScore ©',
|
||||||
|
'href' => 'menu_href_indiscore',
|
||||||
|
'perm' => array( 'name'=>'INDISCORE', 'hidden'=>false ) );
|
||||||
|
$children[] = array('data' => 'IndiScore + ©',
|
||||||
|
'href' => 'menu_href_indiscoreplus');
|
||||||
|
$children[] = array('data' => 'Rapport synthétique',
|
||||||
|
'href' => 'menu_href_rsynthesemin',
|
||||||
|
'perm' => array( 'name'=>'INDISCORE2', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Rapport complet',
|
||||||
|
'href' => 'menu_href_rsynthese',
|
||||||
|
'perm' => array( 'name'=>'INDISCORE3', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Scoring Credit Safe ©',
|
||||||
|
'href' => 'menu_href_creditsafe',
|
||||||
|
'perm' => array( 'name'=>'SCORECSF', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Enquête commerciale',
|
||||||
|
'href' => 'menu_href_enquetec',
|
||||||
|
'perm' => array( 'name'=>'ENQUETEC', 'hidden'=>true ) );
|
||||||
|
$menu[] = array( 'data'=>'EVALUATION', 'children'=>$children);
|
||||||
|
|
||||||
|
//Pieces officielles
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'K-Bis',
|
||||||
|
'href' => 'menu_href_kbis',
|
||||||
|
'perm' => array( 'name'=>'KBIS', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Comptes annuels',
|
||||||
|
'href' => 'menu_href_greffesbilans');
|
||||||
|
$children[] = array('data' => 'Actes & Statuts',
|
||||||
|
'href' => 'menu_href_greffesactes');
|
||||||
|
$menu[] = array( 'data'=>'PIECES OFFICIELLES', 'children'=>$children);
|
||||||
|
|
||||||
|
//Options
|
||||||
|
$children = array();
|
||||||
|
$children[] = array('data' => 'Mes options',
|
||||||
|
'href' => 'menu_href_mesoptions');
|
||||||
|
$children[] = array('data' => 'Mes surveillances',
|
||||||
|
'href' => 'menu_href_surveillances',
|
||||||
|
'perm' => array( 'name'=>'SURVLISTE', 'hidden'=>true ) );
|
||||||
|
$children[] = array('data' => 'Administration',
|
||||||
|
'href'=>'menu_href_administration');
|
||||||
|
$children[] = array('data' => 'Statistiques',
|
||||||
|
'href' => 'menu_href_stats');
|
||||||
|
$children[] = array('data' => 'Surveillances',
|
||||||
|
'href'=>'menu_href_survliste');
|
||||||
|
$children[] = array('data' => 'Se déconnecter',
|
||||||
|
'href'=>'menu_href_logout');
|
||||||
|
$menu[] = array( 'data'=>'OPTIONS', 'children'=>$children);
|
||||||
|
|
||||||
|
function menu()
|
||||||
|
{
|
||||||
|
global $menu, $firephp;
|
||||||
|
$html = '';
|
||||||
|
foreach($menu as $item)
|
||||||
|
{
|
||||||
|
$href = false;
|
||||||
|
$html.= '<div class="collapsed">'."\n";
|
||||||
|
$html.= '<span>'.$item['data'].'</span>'."\n";
|
||||||
|
foreach($item['children'] as $children)
|
||||||
|
{
|
||||||
|
$href = $children['href']();
|
||||||
|
if( isset($children['perm']) )
|
||||||
|
{
|
||||||
|
if( !preg_match('/'.$children['perm']['name'].'\b/i', $_SESSION['tabInfo']['droits']) &&
|
||||||
|
(!isset($children['perm']['hidden']) || $children['perm']['hidden']===false) )
|
||||||
|
{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
elseif( !preg_match('/'.$children['perm']['name'].'\b/i', $_SESSION['tabInfo']['droits']) &&
|
||||||
|
isset($children['perm']['hidden']) && $children['perm']['hidden']===true )
|
||||||
|
{
|
||||||
|
$href = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($href!==false)
|
||||||
|
{
|
||||||
|
$html.= '<a href='.$href.'>';
|
||||||
|
if($href=='#'){ $html.= '<font color="gray">'.$children['data'].'</font>'; }
|
||||||
|
else{ $html.= $children['data']; }
|
||||||
|
$html.= '</a>';
|
||||||
|
$html.= "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$html.='</div>'."\n";
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_recherche_ent()
|
||||||
|
{
|
||||||
|
return './?page=recherche&vue=ent';
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_recherche_dir()
|
||||||
|
{
|
||||||
|
return './?page=recherche&vue=dir';
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_international()
|
||||||
|
{
|
||||||
|
return './?page=international_recherche';
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_list_pre()
|
||||||
|
{
|
||||||
|
$href = false;
|
||||||
|
if (isset($_SESSION['list_pre']) || $_SESSION['list_pre']!=''){
|
||||||
|
return './?page=recherche&vue=list_pre';
|
||||||
|
}else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_list_derniere_recherche()
|
||||||
|
{
|
||||||
|
$href = false;
|
||||||
|
if( count($_SESSION['recherche']['list'])>0 && ( $_SESSION['tabInfo']['idClient']==1 || $_SESSION['tabInfo']['idClient']==2 ) ){
|
||||||
|
$href = './?page=recherche&vue=histo';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_annonce()
|
||||||
|
{
|
||||||
|
$href = false;
|
||||||
|
if( $_SESSION['tabInfo']['idClient']==1 ){
|
||||||
|
$href = './?page=recherche&vue=annonce';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_ipari()
|
||||||
|
{
|
||||||
|
global $siret;
|
||||||
|
if ($siret*1!=0){
|
||||||
|
return IPARI_URL.'?siret='.$siret;
|
||||||
|
} else {
|
||||||
|
return IPARI_URL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_identite()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1==0 && $idEntreprise*1==0){
|
||||||
|
return '#';
|
||||||
|
} else{
|
||||||
|
return './?page=identite&siret='.$siret.'&idEntreprise='.$idEntreprise; }
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_etablissement()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=etablissements&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_lienentreprise()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=liens&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_insee()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=evenements&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_dirigeants()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=dirigeants&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_histodirigeants()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=dirigeants&vue=histo&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_synthese()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=synthese&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_bilans()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
$href = './?page=bilans&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
}else{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_ratios()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=ratios&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
}else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_liasse()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
$href = './?page=liasse&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_bourse()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=bourse&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_banque()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if( $_SESSION['tabInfo']['idClient']==1 ){
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
$href = './?page=banque&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_annonces()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise, $firephp;
|
||||||
|
$firephp->log($siret, 'siret');
|
||||||
|
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
||||||
|
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
||||||
|
$href = '#';
|
||||||
|
if(($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized'])){
|
||||||
|
if ($siret*1!=0)
|
||||||
|
{
|
||||||
|
$href = './?page=annonces&siret='.$siret.'&source='.$source.'&idEntreprise='.$idEntreprise;
|
||||||
|
}
|
||||||
|
elseif ($siret*1==0 && isset($idEntreprise) && $idEntreprise!=0 )
|
||||||
|
{
|
||||||
|
$href = './?page=annonces&idEntreprise='.$idEntreprise.'&idan='.$sourceId.'&siret='.$siret.'&source='.$source;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_infosreg()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=infosreg&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_competences()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise, $tabEntrep;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=competences&siret='.$siret.'&codcom='.$tabEntrep['codeCommune'].'&vue=tous&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_conventions()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise, $tabEntrep;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=conventions&siret='.$siret.'&codcom='.$tabEntrep['codeCommune'].'&nafEn='.$tabEntrep['nafEn'].'&nafEt='.$tabEntrep['nafEt'].'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_marques()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=marques&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_indiscore()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
return './?page=indiscore&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_indiscoreplus()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
if ($_SESSION['tabInfo']['login']=='reunicacsf' ||
|
||||||
|
$_SESSION['tabInfo']['login']=='testreunica' ||
|
||||||
|
$_SESSION['tabInfo']['login']=='ylenaour' ||
|
||||||
|
$_SESSION['tabInfo']['login']=='mheitz' ||
|
||||||
|
$_SESSION['tabInfo']['login']=='mricois' ||
|
||||||
|
$_SESSION['tabInfo']['login']=='jmartory' )
|
||||||
|
{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_creditsafe()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']) )
|
||||||
|
{
|
||||||
|
$href = './?page=scorescf&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
}else {
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_rsynthese()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ( $siret*1!=0 ) {
|
||||||
|
$href = './?page=rsynthese&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
}else{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_rsynthesemin()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ( $siret*1!=0 ) {
|
||||||
|
$href = './?page=rsynthesemin&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
}else{
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_enquetec()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
||||||
|
{
|
||||||
|
$href = './?page=enquetec&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_kbis()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0)
|
||||||
|
{
|
||||||
|
$href = './?page=kbis2&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_greffesbilans()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0)
|
||||||
|
{
|
||||||
|
$href = './?page=greffes&vue=bilans&siret='.$siret.'&idEntreprise='.$idEntreprise;
|
||||||
|
} else {
|
||||||
|
$href = '#';
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_greffesactes()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($siret*1!=0) { $href = './?page=greffes&vue=actes&siret='.$siret.'&idEntreprise='.$idEntreprise; }
|
||||||
|
elseif ( $siret==0 && isset($idEntreprise) && $idEntreprise!=0 )
|
||||||
|
{
|
||||||
|
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
||||||
|
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
||||||
|
$href = './?page=greffes&vue=actes&idEntreprise='.$idEntreprise.'&idan='.$sourceId.'&siret='.$siret.'&source='.$source;
|
||||||
|
}
|
||||||
|
else { $href = '#'; }
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_mesoptions()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ($_SESSION['tabInfo']['login']<>'testreunica' && $_SESSION['tabInfo']['login']<>'reunicacsf' && $_SESSION['tabInfo']['login']<>'reunicastats' )
|
||||||
|
{
|
||||||
|
$href = './?page=moncompte&idEntreprise='.$idEntreprise.'&siret='.$siret;
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_surveillances()
|
||||||
|
{
|
||||||
|
$href = './?page=surveillance';
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_administration()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if ( ($_SESSION['tabInfo']['profil']=='Administrateur' ||
|
||||||
|
$_SESSION['tabInfo']['profil']=='SuperAdministrateur') &&
|
||||||
|
$_SESSION['tabInfo']['login']<>'testreunica' &&
|
||||||
|
$_SESSION['tabInfo']['login']<>'reunicacsf' &&
|
||||||
|
$_SESSION['tabInfo']['login']<>'reunicastats')
|
||||||
|
{
|
||||||
|
$href = './?page=administration&idEntreprise='.$idEntreprise.'&siret='.$siret;
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_stats()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if (($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur' ) && $_SESSION['tabInfo']['login']=='ylenaour' || $_SESSION['tabInfo']['login']=='mheitz' || $_SESSION['tabInfo']['login']=='jmartory' || $_SESSION['tabInfo']['login']=='reunicastats' )
|
||||||
|
{
|
||||||
|
$href = './?page=stats&idEntreprise='.$idEntreprise.'&siret='.$siret;
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_survliste()
|
||||||
|
{
|
||||||
|
global $siret, $idEntreprise;
|
||||||
|
$href = false;
|
||||||
|
if (substr( $_SESSION['tabInfo']['login'],0,6)=='cnasea' || $_SESSION['tabInfo']['idClient']==32 )
|
||||||
|
{
|
||||||
|
$href = './?page=survliste&idEntreprise='.$idEntreprise.'&siret='.$siret;
|
||||||
|
}
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_href_logout()
|
||||||
|
{
|
||||||
|
return './?page=main&action=logout';
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
class Graphperso {
|
class Graphperso {
|
||||||
|
|
||||||
// Déclaration des tableaux
|
// Déclaration des tableaux
|
||||||
|
@ -140,12 +140,11 @@ function dSecteur($nAnnee,$nRatio){
|
|||||||
* Le n° de ratio.
|
* Le n° de ratio.
|
||||||
*/
|
*/
|
||||||
function dRatio($nAnnee,$nRatio){
|
function dRatio($nAnnee,$nRatio){
|
||||||
global $ratiosEntrep;
|
global $ratiosEntrep, $ratiosInfos, $firephp;
|
||||||
global $ratiosInfos;
|
|
||||||
$ratio = $ratiosEntrep[$nAnnee][$nRatio];
|
$ratio = $ratiosEntrep[$nAnnee][$nRatio];
|
||||||
$return = '';
|
$return = '';
|
||||||
$formatRatio = TRUE;
|
$formatRatio = TRUE;
|
||||||
if ($ratio=='NS') {
|
if ($ratio=='NS' || $ratio==0) {
|
||||||
$return.= 'NS';
|
$return.= 'NS';
|
||||||
$formatRatio = FALSE;
|
$formatRatio = FALSE;
|
||||||
}elseif(substr($ratio,0,1)=='<' ){
|
}elseif(substr($ratio,0,1)=='<' ){
|
||||||
@ -196,6 +195,19 @@ function dEvol($nAnnee,$nRatio){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dTotal($nAnnee, $nRatio, $nTotal)
|
||||||
|
{
|
||||||
|
global $ratiosEntrep, $firephp;
|
||||||
|
$ratio = isset($ratiosEntrep[$nAnnee][$nRatio]) ? $ratiosEntrep[$nAnnee][$nRatio] : 0;
|
||||||
|
$total = isset($ratiosEntrep[$nAnnee][$nTotal]) ? $ratiosEntrep[$nAnnee][$nTotal] : 0;
|
||||||
|
$firephp->log($total, 'total');
|
||||||
|
if($total!=0){
|
||||||
|
return number_format($ratio*100/$total, 2);
|
||||||
|
}else{
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le pourcentage d'un ratio par rapport au total pour les graphiques .
|
* Retourne le pourcentage d'un ratio par rapport au total pour les graphiques .
|
||||||
* @param sting $nRatio
|
* @param sting $nRatio
|
||||||
@ -204,10 +216,10 @@ function dEvol($nAnnee,$nRatio){
|
|||||||
* Le n° du ratio total
|
* Le n° du ratio total
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function graphPercent($nRatio,$totalRatio){
|
function graphPercent($nAnnee,$nRatio,$totalRatio){
|
||||||
global $ratiosEntrep;
|
global $ratiosEntrep;
|
||||||
$ratio = isset($ratiosEntrep[0][$nRatio]) ? $ratiosEntrep[0][$nRatio] : 0;
|
$ratio = isset($ratiosEntrep[$nAnnee][$nRatio]) ? $ratiosEntrep[$nAnnee][$nRatio] : 0;
|
||||||
$totalRatio = $ratiosEntrep[0][$totalRatio];
|
$totalRatio = $ratiosEntrep[$nAnnee][$totalRatio];
|
||||||
if ( ($ratio!='NS' || $ratio!=NULL) && ($totalRatio!=0 || $totalRatio!='NS')){
|
if ( ($ratio!='NS' || $ratio!=NULL) && ($totalRatio!=0 || $totalRatio!='NS')){
|
||||||
return $ratio*100/$totalRatio;
|
return $ratio*100/$totalRatio;
|
||||||
}else{
|
}else{
|
||||||
@ -259,4 +271,169 @@ function wrapComment($text){
|
|||||||
$newtext = nl2br($newtext);
|
$newtext = nl2br($newtext);
|
||||||
return $newtext;
|
return $newtext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compte le nombre de bilans par type et renvoi un type de bilan par defaut
|
||||||
|
* @param array $bilansInfos
|
||||||
|
* @param string $typeBilan
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function countBilans($bilansInfos, $typeBilan='')
|
||||||
|
{
|
||||||
|
$numBilanC = 0;
|
||||||
|
$numBilanN = 0;
|
||||||
|
$numBilanS = 0;
|
||||||
|
if(count($bilansInfos)>0)
|
||||||
|
{
|
||||||
|
foreach($bilansInfos as $key => $item)
|
||||||
|
{
|
||||||
|
if($item['typeBilan']=='C') { $numBilanC++; }
|
||||||
|
if($item['typeBilan']=='N') { $numBilanN++; }
|
||||||
|
if($item['typeBilan']=='S') { $numBilanS++; }
|
||||||
|
if($item['typeBilan']=='B') { $numBilanB++; }
|
||||||
|
if($item['typeBilan']=='A') { $numBilanA++; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$numBilanN = $numBilanN+$numBilanS;
|
||||||
|
if($typeBilan=='')
|
||||||
|
{
|
||||||
|
if($numBilanN>0){ $typeBilan = 'N'; }
|
||||||
|
if($numBilanN==0 && $numBilanC>0){ $typeBilan = 'C'; }
|
||||||
|
}
|
||||||
|
$numBilan = array( 'N'=>$numBilanN , 'C'=>$numBilanC , 'B'=>$numBilanB, 'A'=>$numBilanA);
|
||||||
|
return array($typeBilan, $numBilan);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filtre les bilans suivants leur type
|
||||||
|
* @param array $bilansInfos
|
||||||
|
* @param array $ratiosEntrep
|
||||||
|
* @param array $ratiosEntrepEvol
|
||||||
|
* @param array $dataActif
|
||||||
|
* @param array $dataPassif
|
||||||
|
* @param array $dataSIG
|
||||||
|
* @param string $typeBilan
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan)
|
||||||
|
{
|
||||||
|
global $firephp;
|
||||||
|
if(count($bilansInfos)>0)
|
||||||
|
{
|
||||||
|
//Eliminer les doublons, on garde en priorités les bilans de type S
|
||||||
|
$tabBilanS = array();
|
||||||
|
$tabBilanN = array();
|
||||||
|
foreach($bilansInfos as $key => $item)
|
||||||
|
{
|
||||||
|
if($item['typeBilan']=='S'){ $tabBilanS[$item['dateCloture']] = 1; }
|
||||||
|
}
|
||||||
|
//Suppression des doublons + les types S deviennent des types N
|
||||||
|
$index = 0;
|
||||||
|
foreach($bilansInfos as $key => $item)
|
||||||
|
{
|
||||||
|
$date = $item['dateCloture'];
|
||||||
|
$type = $item['typeBilan'];
|
||||||
|
if($type=='N' && array_key_exists($date,$tabBilanS))
|
||||||
|
{
|
||||||
|
$firephp->info('Suppression doublon');
|
||||||
|
$firephp->log($index,'index');
|
||||||
|
array_splice($bilansInfos, $index, 1);
|
||||||
|
array_splice($ratiosEntrep, $index, 1);
|
||||||
|
array_splice($ratiosEntrepEvol, $index, 1);
|
||||||
|
array_splice($ratiosSecteur, $index, 1);
|
||||||
|
if(count($dataActif)>0) array_splice($dataActif, $index, 1);
|
||||||
|
if(count($dataPassif)>0) array_splice($dataPassif, $index, 1);
|
||||||
|
if(count($dataSIG)>0) array_splice($dataSIG, $index, 1);
|
||||||
|
$index--;
|
||||||
|
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
$index=0;
|
||||||
|
foreach($bilansInfos as $key => $item)
|
||||||
|
{
|
||||||
|
if($item['typeBilan']=='S'){ $bilansInfos[$index]['typeBilan']='N'; }
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
//En fonction du type de bilan sélectionné
|
||||||
|
//on filtre les bilans avant de les envoyer sur l'affichage
|
||||||
|
$index = 0;
|
||||||
|
foreach($bilansInfos as $key => $item)
|
||||||
|
{
|
||||||
|
if($item['typeBilan']!=$typeBilan )
|
||||||
|
{
|
||||||
|
$firephp->info('Suppression pour filtrage');
|
||||||
|
$firephp->log($index,'index');
|
||||||
|
array_splice($bilansInfos, $index, 1);
|
||||||
|
array_splice($ratiosEntrep, $index, 1);
|
||||||
|
array_splice($ratiosEntrepEvol, $index, 1);
|
||||||
|
array_splice($ratiosSecteur, $index, 1);
|
||||||
|
if(count($dataActif)>0) array_splice($dataActif, $index, 1);
|
||||||
|
if(count($dataPassif)>0) array_splice($dataPassif, $index, 1);
|
||||||
|
if(count($dataSIG)>0) array_splice($dataSIG, $index, 1);
|
||||||
|
$index--;
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne les ratios à afficher
|
||||||
|
* @param string $ratio
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function syntheseRatio($ratio)
|
||||||
|
{
|
||||||
|
$tabRatio = array(
|
||||||
|
'r5' => array('evol'=>'r6', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||||
|
'r7' => array('evol'=>'r8', 'op' => 1000, 'titre'=>'RESULTAT COURANT AVANT IMPOTS'),
|
||||||
|
'r10' => array('evol'=>'r11', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||||
|
'r18' => array('evol'=>'r19', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||||
|
'r22' => array('evol'=>'r23', 'op' => 1000, 'titre'=>'TOTAL BILAN'),
|
||||||
|
'r231' => array('evol'=>'r235', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
||||||
|
'r232' => array('evol'=>'r236', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
||||||
|
'r63' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
||||||
|
'r24' => array('evol'=>'r24', 'op' => 1, 'titre'=>'EFFECTIF', 'unite' => 1),
|
||||||
|
);
|
||||||
|
|
||||||
|
if($ratio!=''){
|
||||||
|
$tabRatio = array( $ratio => $tabRatio[$ratio]);
|
||||||
|
}
|
||||||
|
return $tabRatio;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function syntheseRatioMin()
|
||||||
|
{
|
||||||
|
$tabRatio = array(
|
||||||
|
'r5' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
||||||
|
'r16' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT D\'EXPLOITATION'),
|
||||||
|
'r7' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT COURANT'),
|
||||||
|
'r10' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
||||||
|
'r70' => array('total'=>'r22', 'total_info'=>'% bilan', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
||||||
|
'r63' => array('total'=>'', 'total_info'=>'', 'op' => 1000, 'titre'=>'TRESORERIE NETTE'),
|
||||||
|
'r20' => array('total'=>'r5', 'total_info'=>'% ca', 'op' => 1000, 'titre'=>'FRAIS FINANCIER'),
|
||||||
|
);
|
||||||
|
return $tabRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourn les ratios à afficher pour le graphique
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function syntheseRatioGraph()
|
||||||
|
{
|
||||||
|
$tabRatioGraph = array(
|
||||||
|
0 => array('ratio'=>'r236', 'op' => 1000),
|
||||||
|
1 => array('ratio'=>'r235', 'op' => 1000),
|
||||||
|
2 => array('ratio'=>'r6', 'op' => 1000),
|
||||||
|
3 => array('ratio'=>'r146', 'op' => 1000)
|
||||||
|
);
|
||||||
|
return $tabRatioGraph;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -2,32 +2,124 @@
|
|||||||
|
|
||||||
require_once realpath(dirname(__FILE__)).'/functions.php';
|
require_once realpath(dirname(__FILE__)).'/functions.php';
|
||||||
|
|
||||||
|
function formatRatios($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosInfos, $ratiosSecteur)
|
||||||
|
{
|
||||||
|
//Suppression des éléments ne possédant pas de date de cloture
|
||||||
|
$index = 0;
|
||||||
|
foreach($bilansInfos as $bilansInfo)
|
||||||
|
{
|
||||||
|
if(!isset($bilansInfo['dateCloture']))
|
||||||
|
{
|
||||||
|
unset($bilansInfos[$index]);
|
||||||
|
unset($ratiosEntrep[$index]);
|
||||||
|
unset($ratiosEntrepEvol[$index]);
|
||||||
|
unset($ratiosInfos[$index]);
|
||||||
|
unset($ratiosSecteur[$index]);
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Tri des tableaux par ordre décroissant suivant la date de cloture
|
||||||
|
//Transformation du tableau sous forme clé => valeur
|
||||||
|
foreach ($bilansInfos as $key => $row) {
|
||||||
|
$bilansInfos[$key]['cle'] = $key;
|
||||||
|
$date[$key] = $row['dateCloture'];
|
||||||
|
$duree[$key] = $row['duree'];
|
||||||
|
$devise[$key] = $row['devise'];
|
||||||
|
$unite[$key] = $row['unite'];
|
||||||
|
$cle[$key] = $row['cle'];
|
||||||
|
}
|
||||||
|
//Tri du tableau de référence suivant la date de cloture
|
||||||
|
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
|
||||||
|
|
||||||
|
//Tri des autres tableaux
|
||||||
|
$tempRatiosEntrep = $ratiosEntrep;
|
||||||
|
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
|
||||||
|
$tempRatiosSecteur = $ratiosSecteur;
|
||||||
|
$i = 0;
|
||||||
|
foreach ($bilansInfos as $row)
|
||||||
|
{
|
||||||
|
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
|
||||||
|
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
|
||||||
|
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
|
||||||
|
|
||||||
|
//Génération données graphique actif
|
||||||
|
$dataActif[$i] = array(
|
||||||
|
graphPercent($i,'r51','r22'),
|
||||||
|
graphPercent($i,'r52','r22'),
|
||||||
|
graphPercent($i,'r53','r22'),
|
||||||
|
graphPercent($i,'r60','r22'),
|
||||||
|
graphPercent($i,'r61','r22'),
|
||||||
|
graphPercent($i,'r62','r22'),
|
||||||
|
graphPercent($i,'r63','r22'),
|
||||||
|
);
|
||||||
|
//Génération données graphique passif
|
||||||
|
$dataPassif[$i] = array(
|
||||||
|
graphPercent($i,'r70','r22'),
|
||||||
|
graphPercent($i,'r71','r22'),
|
||||||
|
graphPercent($i,'r72','r22'),
|
||||||
|
graphPercent($i,'r83','r22'),
|
||||||
|
graphPercent($i,'r84','r22'),
|
||||||
|
graphPercent($i,'r85','r22'),
|
||||||
|
graphPercent($i,'r86','r22'),
|
||||||
|
graphPercent($i,'r87','r22'),
|
||||||
|
);
|
||||||
|
//Génération données graphique SIG
|
||||||
|
$dataSIG[$i] = array(
|
||||||
|
graphPercent($i,'r101','r101')-graphPercent($i,'r122','r101'),
|
||||||
|
graphPercent($i,'r122','r101')-graphPercent($i,'r130','r101'),
|
||||||
|
graphPercent($i,'r130','r101')-graphPercent($i,'r140','r101'),
|
||||||
|
graphPercent($i,'r140','r101')-graphPercent($i,'r150','r101'),
|
||||||
|
graphPercent($i,'r150','r101')-graphPercent($i,'r170','r101'),
|
||||||
|
graphPercent($i,'r170','r101')-graphPercent($i,'r199','r101'),
|
||||||
|
graphPercent($i,'r199','r101'),
|
||||||
|
);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
//Fin de tri des tableaux
|
||||||
|
return array(
|
||||||
|
'bilansInfos' => $bilansInfos,
|
||||||
|
'ratiosEntrep' => $ratiosEntrep,
|
||||||
|
'ratiosEntrepEvol' => $ratiosEntrepEvol,
|
||||||
|
'ratiosSecteur' => $ratiosSecteur,
|
||||||
|
'ratiosInfos' => $ratiosInfos,
|
||||||
|
'dataActif' => $dataActif,
|
||||||
|
'dataPassif' => $dataPassif,
|
||||||
|
'dataSIG' => $dataSIG
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne un tableau de données formatés pour les graphiques.
|
* Retourne un tableau de données formatés pour les graphiques.
|
||||||
* @param array $bilansInfo
|
* @param array $bilansInfo
|
||||||
* Le tableau des bilans
|
* Le tableau des bilans
|
||||||
* @param array $ratiosEntrep
|
* @param array $ratiosEntrep
|
||||||
* Le tableau des ratios entreprise
|
* Le tableau des ratios entreprise
|
||||||
* @param array $tabRatioGraph
|
* @param string $ratio
|
||||||
* Un tableau des ratios à utiliser pour le graphique général
|
* Le ratio selectionné
|
||||||
* @param array $tabRatioGraphEvol
|
|
||||||
* Un tableau des ratios à utiliser pour les graphiques d'évolution
|
|
||||||
* @return array
|
* @return array
|
||||||
* Retourne un tableau structuré composé de dataGraph, et de dataEvol.
|
* Retourne un tableau structuré composé de dataGraph, et de dataEvol.
|
||||||
*/
|
*/
|
||||||
function synthese_datagraph($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRatioGraphEvol){
|
function synthese_datagraph($bilansInfos, $ratiosEntrep, $ratio)
|
||||||
|
{
|
||||||
global $firephp;
|
global $firephp;
|
||||||
$dataGraph = array();
|
$dataGraph = array();
|
||||||
$dataEvol = array();
|
$dataEvol = array();
|
||||||
|
|
||||||
|
$tabRatioGraph = syntheseRatioGraph();
|
||||||
|
$tabRatioGraphEvol = syntheseRatio($ratio);
|
||||||
|
|
||||||
$nbrAnnees = count($bilansInfos)-1;
|
$nbrAnnees = count($bilansInfos)-1;
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($bilansInfos as $dateCloture){
|
foreach($bilansInfos as $dateCloture)
|
||||||
|
{
|
||||||
//Données pour le graphique
|
//Données pour le graphique
|
||||||
if(isset($dateCloture['dateCloture'])){
|
if(isset($dateCloture['dateCloture']))
|
||||||
|
{
|
||||||
$dataGraph[$i]['date'] = $dateCloture['dateCloture'];
|
$dataGraph[$i]['date'] = $dateCloture['dateCloture'];
|
||||||
$dataGraph[$i]['duree'] = $dateCloture['duree'];
|
$dataGraph[$i]['duree'] = $dateCloture['duree'];
|
||||||
foreach($tabRatioGraph as $item){
|
foreach($tabRatioGraph as $item)
|
||||||
|
{
|
||||||
$dataGraph[$i][$item['ratio']] = $ratiosEntrep[$i][$item['ratio']]/$item['op'];
|
$dataGraph[$i][$item['ratio']] = $ratiosEntrep[$i][$item['ratio']]/$item['op'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,6 +138,43 @@ function synthese_datagraph($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRat
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne un tableau de données formatés pour les graphiques.
|
||||||
|
* @param array $bilansInfo
|
||||||
|
* Le tableau des bilans
|
||||||
|
* @param array $ratiosEntrep
|
||||||
|
* Le tableau des ratios entreprise
|
||||||
|
* @param string $ratio
|
||||||
|
* Le ratio selectionné
|
||||||
|
* @return array
|
||||||
|
* Retourne un tableau structuré composé de dataGraph, et de dataEvol.
|
||||||
|
*/
|
||||||
|
function synthese_datagraphmin($bilansInfos, $ratiosEntrep)
|
||||||
|
{
|
||||||
|
global $firephp;
|
||||||
|
$dataGraph = array();
|
||||||
|
$dataEvol = array();
|
||||||
|
|
||||||
|
$tabRatioGraphEvol = syntheseRatioMin();
|
||||||
|
|
||||||
|
$nbrAnnees = count($bilansInfos)-1;
|
||||||
|
$i=0;
|
||||||
|
foreach($bilansInfos as $dateCloture)
|
||||||
|
{
|
||||||
|
//Données pour les graphiques évolutions
|
||||||
|
if(isset($bilansInfos[$nbrAnnees-$i]['dateCloture'])){
|
||||||
|
foreach($tabRatioGraphEvol as $ratio => $info){
|
||||||
|
$dataEvol[$ratio][] = array(
|
||||||
|
'date'=>$bilansInfos[$nbrAnnees-$i]['dateCloture'],
|
||||||
|
'value'=>(($ratiosEntrep[$nbrAnnees-$i][$ratio]!='NS') ? $ratiosEntrep[$nbrAnnees-$i][$ratio]/$info['op'] : 0 )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
return array("graph" => $dataGraph, "evol" => $dataEvol);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formatte chaîne contenant la date formaté.
|
* Formatte chaîne contenant la date formaté.
|
||||||
* @param array $bilansInfo
|
* @param array $bilansInfo
|
||||||
@ -72,10 +201,19 @@ function synthese_formatdateCloture($bilansInfos, $nAnnee){
|
|||||||
* @return string
|
* @return string
|
||||||
* Retourne une chaîne.
|
* Retourne une chaîne.
|
||||||
*/
|
*/
|
||||||
function synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio){
|
function synthese_tablerow($ratiosInfos, $dataEvol, $ratio)
|
||||||
global $fileName;
|
{
|
||||||
|
global $siret, $siren, $idEntreprise, $typeBilan, $firephp;
|
||||||
|
|
||||||
|
$tabRatio = syntheseRatio($ratio);
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'synthese-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'synthese-'.$siren; }
|
||||||
|
$fileName.= '-'.$typeBilan;
|
||||||
|
$firephp->log($fileName, 'SyntheseTablerow - filename');
|
||||||
$row = '';
|
$row = '';
|
||||||
foreach($tabRatio as $ratio => $info){
|
foreach($tabRatio as $ratio => $info)
|
||||||
|
{
|
||||||
$row.= '<tr>'."\n".
|
$row.= '<tr>'."\n".
|
||||||
' <td class="head"><a tooltip="'.wrapComment($ratiosInfos[$ratio]['commentaires']).'">'.$info['titre'].'</a></td>'."\n".
|
' <td class="head"><a tooltip="'.wrapComment($ratiosInfos[$ratio]['commentaires']).'">'.$info['titre'].'</a></td>'."\n".
|
||||||
' <td class="right">'.dRatio(2,$ratio).'</td>'."\n".
|
' <td class="right">'.dRatio(2,$ratio).'</td>'."\n".
|
||||||
@ -86,7 +224,7 @@ function synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio){
|
|||||||
|
|
||||||
if(count($tabRatio)!=1){
|
if(count($tabRatio)!=1){
|
||||||
$class = 'class="sTip"';
|
$class = 'class="sTip"';
|
||||||
$href='/?page=synthese&siret='.$_REQUEST['siret'].'&idEntreprise='.$_REQUEST['idEntreprise'].'&ratio='.$ratio;
|
$href = '/?page=synthese&siret='.$_REQUEST['siret'].'&idEntreprise='.$_REQUEST['idEntreprise'].'&ratio='.$ratio;
|
||||||
$unite = '';
|
$unite = '';
|
||||||
if(isset($info['unite']) && $info['unite']==1){
|
if(isset($info['unite']) && $info['unite']==1){
|
||||||
$unite = $ratiosInfos[$info['evol']]['unite'];
|
$unite = $ratiosInfos[$info['evol']]['unite'];
|
||||||
@ -104,6 +242,44 @@ function synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio){
|
|||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne une chaîne contenant les ligne d'un tableau html.
|
||||||
|
* @param array $ratiosInfos
|
||||||
|
* Le tableau des informations ratios
|
||||||
|
* @param array $dataEvol
|
||||||
|
* Le tableau des données évolution
|
||||||
|
* @param array $tabRatio
|
||||||
|
* Un tableau des ratios à utiliser pour générer les lignes
|
||||||
|
* @return string
|
||||||
|
* Retourne une chaîne.
|
||||||
|
*/
|
||||||
|
function synthese_tablerowmin($ratiosInfos, $dataEvol)
|
||||||
|
{
|
||||||
|
global $siret, $siren, $idEntreprise, $typeBilan, $firephp;
|
||||||
|
|
||||||
|
$tabRatio = syntheseRatioMin();
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'synthese-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'synthese-'.$siren; }
|
||||||
|
$fileName.= '-'.$typeBilan;
|
||||||
|
$row = '';
|
||||||
|
foreach($tabRatio as $ratio => $info)
|
||||||
|
{
|
||||||
|
$row.= '<tr>'."\n";
|
||||||
|
$row.= ' <td class="head"><a tooltip="'.wrapComment($ratiosInfos[$ratio]['commentaires']).'">'.$info['titre'].'</a></td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dRatio(2,$ratio).'</td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dTotal(2,$ratio, $info['total']).' '.$info['total_info'].'</td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dRatio(1,$ratio).'</td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dTotal(1,$ratio, $info['total']).' '.$info['total_info'].'</td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dRatio(0,$ratio).'</td>'."\n";
|
||||||
|
$row.= ' <td class="right">'.dTotal(0,$ratio, $info['total']).' '.$info['total_info'].'</td>'."\n";
|
||||||
|
$row.= '</tr>'."\n";
|
||||||
|
}
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne l'url de la page d'appel du graphique avec tous ces paramètres.
|
* Retourne l'url de la page d'appel du graphique avec tous ces paramètres.
|
||||||
* @param array $data
|
* @param array $data
|
||||||
@ -113,12 +289,14 @@ function synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio){
|
|||||||
*/
|
*/
|
||||||
function synthese_graphEvol($data, $unite, $ratio, $filename){
|
function synthese_graphEvol($data, $unite, $ratio, $filename){
|
||||||
require_once 'phpchartdir/phpchartdir.php';
|
require_once 'phpchartdir/phpchartdir.php';
|
||||||
|
global $firephp;
|
||||||
$unite = ( $_REQUEST['unite']!='' ? $unite : 'KEUROS' );
|
$unite = ( $_REQUEST['unite']!='' ? $unite : 'KEUROS' );
|
||||||
|
|
||||||
if(count($data)<=1){
|
if(count($data)<=1){
|
||||||
$return = 0;
|
$return = 0;
|
||||||
}else{
|
}else{
|
||||||
foreach($data as $value){
|
foreach($data as $value)
|
||||||
|
{
|
||||||
$dataX[] = $value['value'];
|
$dataX[] = $value['value'];
|
||||||
$labelsX[] = substr($value['date'],0,4);
|
$labelsX[] = substr($value['date'],0,4);
|
||||||
}
|
}
|
||||||
@ -145,15 +323,19 @@ function synthese_graphEvol($data, $unite, $ratio, $filename){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function synthese_graph_linecompare($data, $filename){
|
function synthese_graph_linecompare($data){
|
||||||
global $firephp;
|
global $siret, $siren, $idEntreprise, $typeBilan;
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $filename = 'synthese-'.$idEntreprise;
|
||||||
|
}else{ $filename = 'synthese-'.$siren; }
|
||||||
|
$filename.='-'.$typeBilan;
|
||||||
|
|
||||||
//Graphique style linecompare / CA / FR / BFR
|
//Graphique style linecompare / CA / FR / BFR
|
||||||
require_once 'phpchartdir/phpchartdir.php';
|
require_once 'phpchartdir/phpchartdir.php';
|
||||||
|
|
||||||
//Tri des données par date et par ordre croissant
|
//Tri des données par date et par ordre croissant
|
||||||
foreach ($data as $key => $row) { $date[$key] = $row['date']; }
|
foreach ($data as $key => $row) { $date[$key] = $row['date']; }
|
||||||
array_multisort($date, SORT_ASC, $data);
|
array_multisort($date, SORT_ASC, $data);
|
||||||
$firephp->log($data, 'data');
|
|
||||||
|
|
||||||
//Définition des valeurs pour le graph
|
//Définition des valeurs pour le graph
|
||||||
$dataBFR = array();
|
$dataBFR = array();
|
||||||
@ -180,7 +362,6 @@ function synthese_graph_linecompare($data, $filename){
|
|||||||
$dataEBE['y'][$i] = $dataEBE['y'][$i+1] = $item['r146'];
|
$dataEBE['y'][$i] = $dataEBE['y'][$i+1] = $item['r146'];
|
||||||
$i+=2;
|
$i+=2;
|
||||||
}
|
}
|
||||||
$firephp->log($dataCA,'dataCA');
|
|
||||||
|
|
||||||
$c = new XYChart(570, 350, 0xcccccc, 0x000000, 1);
|
$c = new XYChart(570, 350, 0xcccccc, 0x000000, 1);
|
||||||
$c->addTitle("Synthèse *", "timesbi.ttf", 15, 0x000000);
|
$c->addTitle("Synthèse *", "timesbi.ttf", 15, 0x000000);
|
||||||
@ -223,7 +404,7 @@ function synthese_graph_linecompare($data, $filename){
|
|||||||
$c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), Transparent, 0x8044ff44);
|
$c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), Transparent, 0x8044ff44);
|
||||||
|
|
||||||
$path = PATH_SITE.'/cache/imgcache/';
|
$path = PATH_SITE.'/cache/imgcache/';
|
||||||
$file = $filename.'-graph-linecompare.png';
|
$file = $filename.'-linecompare.png';
|
||||||
if($c->makeChart($path.$file) === TRUE){
|
if($c->makeChart($path.$file) === TRUE){
|
||||||
$return = '<img src="./imgcache/'.$file.'"/>';
|
$return = '<img src="./imgcache/'.$file.'"/>';
|
||||||
}else{
|
}else{
|
||||||
@ -244,10 +425,54 @@ function synthese_graph_linecompare($data, $filename){
|
|||||||
* @return string
|
* @return string
|
||||||
* Retourne une chaîne.
|
* Retourne une chaîne.
|
||||||
*/
|
*/
|
||||||
function ratios_tablerow($ratiosInfos, $tabRatio, $bilan, $ratio = ''){
|
function ratios_tablerow($ratiosInfos, $bilan, $ratio = ''){
|
||||||
global $fileName;
|
global $siren, $idEntreprise, $typeBilan;
|
||||||
|
|
||||||
foreach($tabRatio as $item){
|
$tabRatio = array(
|
||||||
|
0 => array('titre'=>'EQUILIBRE FINANCIER'),
|
||||||
|
|
||||||
|
1 => array('titre'=>'MARGE BRUTE D\'AUTOFINANCEMENT', 'stitre'=>'(MBA ou CAF)', 'ratio'=>'r233', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
2 => array('titre'=>'COUVERTURE du BFR ', 'stitre'=>'(FR/BFR)', 'ratio'=>'r234', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
3 => array('titre'=>'COUVERTURE des IMMOS NETTES ', 'stitre'=>'(Capitaux permanents / Immobilisations nettes)', 'ratio'=>'r237', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
4 => array('titre'=>'COUVERTURE du CA ', 'stitre'=>'(Fond de roulement net global sur 12m x 360 / Chiffre d\'affaire)', 'ratio'=>'r238', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
5 => array('titre'=>'SOLVABILITE ', 'stitre'=>'(Capitaux propres / Ensemble des dettes)', 'ratio'=>'r239', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
6 => array('titre'=>'INDEPENDANCE FINANCIERE ', 'stitre'=>'(Cap.propres/Capitaux permanents)', 'ratio'=>'r240', 'parent'=>0, 'position'=>'>' ),
|
||||||
|
|
||||||
|
7 => array('titre'=>'PROFITABILITE'),
|
||||||
|
|
||||||
|
8 => array('titre'=>'RENTABILITE ECONOMIQUE ', 'stitre'=>'(EBE/TOTAL bilan)', 'ratio'=>'r262', 'parent'=>7, 'position'=>'>' ),
|
||||||
|
9 => array('titre'=>'RENTABILITE FINANCIERE ', 'stitre'=>'(Résult.Net/Cap.propres)', 'ratio'=>'r263', 'parent'=>7, 'position'=>'>' ),
|
||||||
|
10 => array('titre'=>'RENTABILITE COMMERCIALE ', 'stitre'=>'(Résultat net/CA)', 'ratio'=>'r264', 'parent'=>7, 'position'=>'>' ),
|
||||||
|
11 => array('titre'=>'CONTRIBUTION DU CAPITAL', 'stitre'=>'(Capacité d\'autofinancement sur 12 mois / Capitaux permanents)', 'ratio'=>'r265', 'parent'=>7, 'position'=>'>' ),
|
||||||
|
12 => array('titre'=>'CONTRIBUTION DE LA VA', 'stitre'=>'(Capacité d\'autofinancement / Valeur ajoutée)', 'ratio'=>'r266', 'parent'=>7, 'position'=>'>' ),
|
||||||
|
|
||||||
|
13 => array('titre'=>'LIQUIDITE'),
|
||||||
|
|
||||||
|
14 => array('titre'=>'LIQUIDITE IMMEDIATE', 'stitre'=>'(Disponibilité / Dettes CT)', 'ratio'=>'r250', 'parent'=>13, 'position'=>'>' ),
|
||||||
|
15 => array('titre'=>'LIQUIDITE GENERALE', 'stitre'=>'(Act.circulant net/Dettes CT)', 'ratio'=>'r251', 'parent'=>13, 'position'=>'>' ),
|
||||||
|
16 => array('titre'=>'LIQUIDITE REDUITE', 'stitre'=>'(Disponibilité et créances réelles /Dettes CT)', 'ratio'=>'r252', 'parent'=>13, 'position'=>'>' ),
|
||||||
|
|
||||||
|
17 => array('titre'=>'ENDETTEMENT'),
|
||||||
|
|
||||||
|
18 => array('titre'=>'ENDETTEMENT ', 'stitre'=>'(Dettes a + 1 an / Capitaux propres)', 'ratio'=>'r244', 'parent'=>17, 'position'=>'<' ),
|
||||||
|
19 => array('titre'=>'CAPACITE DE REMBOURSEMENT', 'stitre'=>'(Dettes.bancaires.(+MT+LT+C.bail)/CAF)', 'ratio'=>'r247', 'parent'=>17, 'position'=>'<' ),
|
||||||
|
20 => array('titre'=>'FINANCEMENT DES STOCKS', 'stitre'=>'(Dettes aux fournisseurs / Stock)', 'ratio'=>'r248', 'parent'=>17, 'position'=>'<' ),
|
||||||
|
|
||||||
|
21 => array('titre'=>'PRODUCTIVITE'),
|
||||||
|
|
||||||
|
22 => array('titre'=>'PRODUCTIVITE DE L\'ACTIF', 'stitre'=>'(Chiffre d\'affaire / Actif comptable)', 'ratio'=>'r271', 'parent'=>21, 'position'=>'>' ),
|
||||||
|
23 => array('titre'=>'DUREE CLIENT', 'stitre'=>'(Rotation clients en VJ TTC)', 'ratio'=>'r278', 'parent'=>21, 'position'=>'<' ),
|
||||||
|
24 => array('titre'=>'DUREE FOURNISSEUR', 'stitre'=>'(Rotation fournisseurs en JA TTC)', 'ratio'=>'r279', 'parent'=>21, 'position'=>'<' ),
|
||||||
|
25 => array('titre'=>'POIDS MASSE SALARIALE', 'stitre'=>'(Ch personnel / VA)', 'ratio'=>'r281', 'parent'=>21, 'position'=>'<' ),
|
||||||
|
26 => array('titre'=>'RENDEMENT', 'stitre'=>'(Production sur 12mois / Effectif)', 'ratio'=>'r261', 'parent'=>21, 'position'=>'>' ),
|
||||||
|
27 => array('titre'=>'PRODUCTIVITE', 'stitre'=>'(CA / Effectif)', 'ratio'=>'r267', 'parent'=>21, 'position'=>'>' ),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'ratios-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'ratios-'.$siret; }
|
||||||
|
$fileName.= '-'.$typeBilan;
|
||||||
|
foreach($tabRatio as $item)
|
||||||
|
{
|
||||||
if($ratio==''){
|
if($ratio==''){
|
||||||
if(isset($item['ratio'])){
|
if(isset($item['ratio'])){
|
||||||
$row.= '<tr>'."\n";
|
$row.= '<tr>'."\n";
|
||||||
@ -328,7 +553,7 @@ function bilans_graph_actif($data, $filename){
|
|||||||
$c->setData($data, $labels);
|
$c->setData($data, $labels);
|
||||||
$c->set3D(20);
|
$c->set3D(20);
|
||||||
$path = PATH_SITE.'/cache/imgcache/';
|
$path = PATH_SITE.'/cache/imgcache/';
|
||||||
$file = $filename.'-graph-bilansactif.png';
|
$file = $filename.'-graph-actif.png';
|
||||||
if($c->makeChart($path.$file) === TRUE){
|
if($c->makeChart($path.$file) === TRUE){
|
||||||
$return = '<img src="./imgcache/'.$file.'"/>';
|
$return = '<img src="./imgcache/'.$file.'"/>';
|
||||||
}else{
|
}else{
|
||||||
@ -374,7 +599,7 @@ function bilans_graph_sig($data, $filename){
|
|||||||
$c->setData($data, $labels);
|
$c->setData($data, $labels);
|
||||||
$c->set3D(20);
|
$c->set3D(20);
|
||||||
$path = PATH_SITE.'/cache/imgcache/';
|
$path = PATH_SITE.'/cache/imgcache/';
|
||||||
$file = $filename.'-graph-bilanssig.png';
|
$file = $filename.'-graph-sig.png';
|
||||||
if($c->makeChart($path.$file) === TRUE){
|
if($c->makeChart($path.$file) === TRUE){
|
||||||
$return = '<img src="./imgcache/'.$file.'"/>';
|
$return = '<img src="./imgcache/'.$file.'"/>';
|
||||||
}else{
|
}else{
|
||||||
@ -420,7 +645,7 @@ function bilans_graph_passif($data, $filename){
|
|||||||
$c->setData($data, $labels);
|
$c->setData($data, $labels);
|
||||||
$c->set3D(20);
|
$c->set3D(20);
|
||||||
$path = PATH_SITE.'/cache/imgcache/';
|
$path = PATH_SITE.'/cache/imgcache/';
|
||||||
$file = $filename.'-graph-bilanspassif.png';
|
$file = $filename.'-graph-passif.png';
|
||||||
if($c->makeChart($path.$file) === TRUE){
|
if($c->makeChart($path.$file) === TRUE){
|
||||||
$return = '<img src="./imgcache/'.$file.'"/>';
|
$return = '<img src="./imgcache/'.$file.'"/>';
|
||||||
}else{
|
}else{
|
||||||
|
208
includes/recherche/recherche_annonces.php
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if(isset($_REQUEST['submit']))
|
||||||
|
{
|
||||||
|
unset($_SESSION['recherchehisto']);
|
||||||
|
//Traitement historique
|
||||||
|
if($_REQUEST['formA']['histo']=='on')
|
||||||
|
{
|
||||||
|
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce', 'txt');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($_REQUEST['formA']['source']=='bodacc')
|
||||||
|
{
|
||||||
|
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce');
|
||||||
|
}
|
||||||
|
elseif($_REQUEST['formA']['source']=='asso')
|
||||||
|
{
|
||||||
|
$parametres = array( 'source', 'bodacc', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce');
|
||||||
|
}
|
||||||
|
elseif($_REQUEST['formA']['source']=='balo')
|
||||||
|
{
|
||||||
|
$parametres = array( 'source', 'bodacc', 'annee', 'dateparution', 'nparution', 'bpage', 'naffaire');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach($parametres as $param)
|
||||||
|
{
|
||||||
|
if( isset($_REQUEST['formA'][$param]) )
|
||||||
|
{
|
||||||
|
$_SESSION['recherchehisto'][$param] = $_REQUEST['formA'][$param];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header("Location: ./index.php?page=recherche&vue=annoncelist");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="./js/jquery-ui.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function formSource(source)
|
||||||
|
{
|
||||||
|
var fields = Array( 'bodacc', 'histo', 'date', 'nparution', 'page', 'nannonce', 'naffaire', 'txt' );
|
||||||
|
switch(source)
|
||||||
|
{
|
||||||
|
case 'asso':
|
||||||
|
var field_actif = new Array('date', 'nparution', 'page', 'nannonce');
|
||||||
|
break;
|
||||||
|
case 'bodacc':
|
||||||
|
var field_actif = new Array('bodacc', 'histo', 'date', 'nparution', 'page', 'nannonce');
|
||||||
|
break;
|
||||||
|
case 'balo':
|
||||||
|
var field_actif = new Array('date', 'nparution', 'page', 'naffaire');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
for (var i=0;i<fields.length;i++) { $('#'+fields[i]).css('display', 'none') }
|
||||||
|
for (var i=0;i<field_actif.length;i++){ $('#'+field_actif[i]).css('display', 'block') }
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
//Init
|
||||||
|
formSource($('select[name=formA[source]]').val());
|
||||||
|
if($('input[type=checkbox][name=formA[histo]]').attr('checked')== true){ $('#txt').css('display','block');
|
||||||
|
}else{ $('#txt').css('display','none'); }
|
||||||
|
|
||||||
|
//Evenement
|
||||||
|
$("#datepicker").datepicker();
|
||||||
|
|
||||||
|
$('select[name=formA[source]]').change(function(){ formSource($(this).val()); });
|
||||||
|
|
||||||
|
$('input[type=checkbox][name=formA[histo]]').click(function(){
|
||||||
|
if($(this).attr('checked')== true){ $('#txt').css('display','block');
|
||||||
|
}else{ $('#txt').css('display','none'); }
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#deselectBodacc').click(function(){
|
||||||
|
$('input[type=radio][name=formA[bodacc]]').each(function(){
|
||||||
|
$(this).attr('checked', false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" type="text/css" media="all" href="./css/jquery-ui.css"/>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
#center { clear:both; }
|
||||||
|
.infoTitle {clear:both; float:left; width:180px; margin-left:30px; padding:0 10px 0 0;}
|
||||||
|
.infoData {float:left; width:320px; margin:2px 0;}
|
||||||
|
form {}
|
||||||
|
form em { color:#FF0000;}
|
||||||
|
fieldset {border:0; margin:0; padding:0;}
|
||||||
|
fieldset legend{ padding:0 0 0 10px;}
|
||||||
|
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
||||||
|
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
||||||
|
.fieldgrp label{ width:150px; font-weight:bold; margin-left:30px; clear:both; padding:0 10px 0 0; line-height:22px; _padding-top:3px; float:left; display:block; font-size:108%;}
|
||||||
|
.fieldgrp label.inline{ clear:none; margin:0; float:left; display:block; width:auto;}
|
||||||
|
.fieldgrp label span{font-weight:normal;}
|
||||||
|
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
|
||||||
|
.fieldgrp p { clear:both; margin:0 0 0 30px; font-size:12px; }
|
||||||
|
.field { float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
||||||
|
.field .longfield{width:215px;}
|
||||||
|
.field .longfield-select{width:220px;}
|
||||||
|
.field .smallfield{width:95px;}
|
||||||
|
.field .medfield{width:110px;}
|
||||||
|
.field input, .field select{ font-size:110%; margin:2px 0; }
|
||||||
|
.field input.radio { margin:0 5px; vertical-align:middle; border:none; }
|
||||||
|
.field input.checkbox { border:none; }
|
||||||
|
.field span { margin-left:10px; }
|
||||||
|
div.submit{ width:100%; text-align:center; }
|
||||||
|
.noborder {border:none;}
|
||||||
|
</style>
|
||||||
|
<div id="center">
|
||||||
|
|
||||||
|
<h1>Rechercher une annonce</h1>
|
||||||
|
|
||||||
|
<form name="annonces" method="post" action="./index.php?page=recherche&vue=annonce">
|
||||||
|
<input type="hidden" name="formA[type]" value="annonces"/>
|
||||||
|
|
||||||
|
<div class="fieldgrp">
|
||||||
|
<label for="source">Source</label>
|
||||||
|
<div class="field">
|
||||||
|
<select name="formA[source]">
|
||||||
|
<option value="bodacc" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='bodacc')? 'selected' : ''?>>BODACC / BORC</option>
|
||||||
|
<option value="asso" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='asso')? 'selected' : ''?>>JO Association</option>
|
||||||
|
<option value="balo" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='balo')? 'selected' : ''?>>BALO</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="bodacc" class="fieldgrp">
|
||||||
|
<label for="bodacc">Bodacc</label>
|
||||||
|
<div class="field">
|
||||||
|
<span><input class="radio" type="radio" name="formA[bodacc]" value="a" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='a')? 'checked' : ''?>/>A</span>
|
||||||
|
<span><input class="radio" type="radio" name="formA[bodacc]" value="b" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='b')? 'checked' : ''?>/>B</span>
|
||||||
|
<span><input class="radio" type="radio" name="formA[bodacc]" value="c" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='c')? 'checked' : ''?>/>C</span>
|
||||||
|
<span><a href="#" id="deselectBodacc">Désélection</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="histo" class="fieldgrp">
|
||||||
|
<label for="histo">Historique jusqu'à 1953</label>
|
||||||
|
<div class="field">
|
||||||
|
<input class="checkbox" type="checkbox" name="formA[histo]" <?=(isset($_SESSION['recherchehisto']['histo']) && $_SESSION['recherchehisto']['histo']=='on')? 'checked' : ''?>/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="date" class="fieldgrp">
|
||||||
|
<label for="annee">Année</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[annee]" size="4" maxlength="4" value="<?=$_SESSION['recherchehisto']['annee']?>"/>
|
||||||
|
</div>
|
||||||
|
<label class="inline" for="dateparution">ou Date de parution</label>
|
||||||
|
<div class="field">
|
||||||
|
<input id="datepicker" type="text" name="formA[dateparution]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['dateparution']?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nparution" class="fieldgrp">
|
||||||
|
<label for="nparution">Numéro de parution</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[nparution]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['nparution']?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="page" class="fieldgrp">
|
||||||
|
<label for="page">Page</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[bpage]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['bpage']?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nannonce" class="fieldgrp">
|
||||||
|
<label for="nannonce">Numéro d'annonce</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[nannonce]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['nannonce']?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="naffaire" class="fieldgrp">
|
||||||
|
<label for="naffaire">Numéro d'affaire</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[naffaire]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['naffaire']?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="txt" class="fieldgrp">
|
||||||
|
<label for="txt">Recherche</label>
|
||||||
|
<div class="field">
|
||||||
|
<input type="text" name="formA[txt]" size="55" maxlength="2048" value="<?=htmlspecialchars($_SESSION['recherchehisto']['txt'])?>"/>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<b><u>Attention :</u></b>
|
||||||
|
Ce formulaire de recherche permet de rechercher dans les pages entières du BORC, BODAC et BODACC telles qu'elles ont été numérisées par Scores & Décisions.
|
||||||
|
Cette recherche permet de rechercher des annonces dans des pages jusqu'à l'année de parution <b>1953</b>.
|
||||||
|
</p>
|
||||||
|
<p> </p>
|
||||||
|
<p><u>Opérateurs et méthodes de recherche :</u></p>
|
||||||
|
<p>Opérateur OU, <b>|</b> (ex: <b>societe | ville</b>)</p>
|
||||||
|
<p>Exclure des termes, <b>-</b> ou <b>!</b> (ex: <b>societe -ville</b> ou <b>societe !ville</b>)</p>
|
||||||
|
<p>Phrase (ex: <b>"boulangerie dupain"</b>)</p>
|
||||||
|
<p>Recherche de proximité (ex: <b>"boulangerie plantes"$50</b> , recherche d'une boulangerie dans rue des plantes )</p>
|
||||||
|
<p>Ordre de recherche (ex: <b>boulangerie << dupain</b> , recherche du mot "boulangerie" puis du mot "dupain") </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="submit"><input type="submit" name="submit" value="Ok"/></div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
85
includes/recherche/recherche_annonceslist.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce', 'naffaire', 'txt');
|
||||||
|
foreach($parametres as $param)
|
||||||
|
{
|
||||||
|
isset($_SESSION['recherchehisto'][$param])? ${$param}=$_SESSION['recherchehisto'][$param] : ${$param}='';
|
||||||
|
}
|
||||||
|
if( !isset($annee) && isset($dateparution) )
|
||||||
|
{
|
||||||
|
$dateparution = str_replace('/', '', $dateparution);
|
||||||
|
$jj = substring($annee, 0, 2);
|
||||||
|
$mm = substring($annee, 2, 2);
|
||||||
|
$aa = substring($annee, 4, 4);
|
||||||
|
$dateparution = $aa.$mm.$jj;
|
||||||
|
}
|
||||||
|
|
||||||
|
isset($_REQUEST['p']) ? $p=$_REQUEST['p'] : $p=0 ;
|
||||||
|
|
||||||
|
//TODO: Supprimer les caractères accentués
|
||||||
|
|
||||||
|
//Affichage
|
||||||
|
?>
|
||||||
|
<div id="center">
|
||||||
|
<?php
|
||||||
|
if($histo!='on')
|
||||||
|
{
|
||||||
|
$ra = array();
|
||||||
|
$ra['dateAnnee'] = $annee;
|
||||||
|
$ra['numParution'] = $nparution;
|
||||||
|
if($source=='bodacc')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper('bod'.$bodacc);
|
||||||
|
$ra['numAnnonce'] = $nannonce;
|
||||||
|
}
|
||||||
|
elseif($source=='balo')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper($source);
|
||||||
|
$ra['numAnnonce'] = $naffaire;
|
||||||
|
}
|
||||||
|
elseif($source=='asso')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper($source);
|
||||||
|
$ra['numAnnonce'] = $nannonce;
|
||||||
|
}
|
||||||
|
$firephp->log($ra,'REQUETE');
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
$source IN ('BODA', 'BODB', 'BODC', 'ASSO', 'BALO')
|
||||||
|
$dateAnnee 1999 ou 1999-11-23
|
||||||
|
$numParution entre 1 et YYYYY
|
||||||
|
$numAnnonce entre 1 et XXXXX
|
||||||
|
*/
|
||||||
|
$O = $client->rechercheAnnonce($ra['source'], $ra['dateAnnee'], $ra['numParution'], $ra['numAnnonce']);
|
||||||
|
$firephp->log($O,'result');
|
||||||
|
} catch (SoapFault $fault) {
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
require_once 'i18n/cleanchar.php';
|
||||||
|
//Suppression des caractères accentués
|
||||||
|
$txt = cleanstring($txt);
|
||||||
|
//Remplacement du caractère § par ~
|
||||||
|
$txt = str_replace('$', '~', $txt);
|
||||||
|
$firephp->log($txt, 'txt');
|
||||||
|
try {
|
||||||
|
$O = $client->rechercheHisto($txt, $annee, $bodacc, $p, $_SESSION['tabInfo']['nbReponses']);
|
||||||
|
$firephp->log($O,'result');
|
||||||
|
} catch (SoapFault $fault) {
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($histo!='on')
|
||||||
|
{
|
||||||
|
require_once realpath(dirname(__FILE__)).'/recherche_vueannonce.php';
|
||||||
|
}else{
|
||||||
|
require_once realpath(dirname(__FILE__)).'/recherche_vuehisto.php';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
@ -4,6 +4,13 @@
|
|||||||
require_once 'recherche/session.php';
|
require_once 'recherche/session.php';
|
||||||
$nb_recherche = count($_SESSION['recherche']['list']);
|
$nb_recherche = count($_SESSION['recherche']['list']);
|
||||||
|
|
||||||
|
require_once 'recherche/session.php';
|
||||||
|
$parametres = recherche_element(0);
|
||||||
|
if( isset($parametres) && $parametres['info']['page']=='recherche' )
|
||||||
|
{
|
||||||
|
recherche_saveinfo( array('page' => '') );
|
||||||
|
}
|
||||||
|
|
||||||
if($nb_recherche==0){
|
if($nb_recherche==0){
|
||||||
?>
|
?>
|
||||||
Aucune recherche enregistrée.
|
Aucune recherche enregistrée.
|
||||||
|
63
includes/recherche/recherche_vueannonce.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
<h1 class="titre">RECHERCHE ANNONCES LÉGALES</h1>
|
||||||
|
<?php
|
||||||
|
require_once 'common/dates.php';
|
||||||
|
require_once 'siren.php';
|
||||||
|
|
||||||
|
$parametresTxt = array(
|
||||||
|
'source'=>'Source',
|
||||||
|
'bodacc'=>'Type',
|
||||||
|
'histo'=>'',
|
||||||
|
'annee'=>'Année',
|
||||||
|
'dateparution'=>'Date de parution',
|
||||||
|
'nparution'=>'Numéro de parution',
|
||||||
|
'bpage'=>'Page',
|
||||||
|
'nannonce'=>'Numéro d\'annonce',
|
||||||
|
'naffaire'=>'Numéro d\'affaire',
|
||||||
|
'txt'=>'Recherche');
|
||||||
|
$strCriteres = '';
|
||||||
|
foreach ($parametresTxt as $key => $param)
|
||||||
|
{
|
||||||
|
if($_SESSION['recherchehisto'][$key]!='' && $param!='')
|
||||||
|
{
|
||||||
|
$strCriteres.= $param.' : '.$_SESSION['recherchehisto'][$key].', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $O['nbReponses']==0)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<p class="StyleInfoLib">
|
||||||
|
Pas de résultat affiché avec le(s) critère(s) <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Affichage des critères de recherche
|
||||||
|
?>
|
||||||
|
<p class="StyleInfoLib">Critères de recherche <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a></p>
|
||||||
|
<div id="annonce">
|
||||||
|
<?php
|
||||||
|
//Affichage des données
|
||||||
|
foreach( $O['reponses'] as $annonce )
|
||||||
|
{
|
||||||
|
$texte = preg_replace_callback("/((?:[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, $annonce['Annonce']);
|
||||||
|
|
||||||
|
if(substr($O['criteres']['source'], 0, 3) == 'BOD' )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
Source BODACC n°<?=$annonce['Num_Parution']?> <?=substr($O['criteres']['source'], 3, 1)?> du <?=WDate::dateT('Y-m-d', 'd/m/Y', $annonce['Date_Parution'])?>.
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
Département n°<?=$annonce['Departement']?>. <?=$annonce['Tribunal_Code']?>
|
||||||
|
<br/><br/>
|
||||||
|
<code><?=$texte?></code><br/>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
107
includes/recherche/recherche_vuehisto.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?php ?>
|
||||||
|
<style type="text/css">
|
||||||
|
ol li { margin-bottom:10px; }
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
$parametresTxt = array(
|
||||||
|
'source'=>'Source',
|
||||||
|
'annee'=>'Année',
|
||||||
|
'dateparution'=>'Date de parution',
|
||||||
|
'nparution'=>'Numéro de parution',
|
||||||
|
'bpage'=>'Page',
|
||||||
|
'nannonce'=>'Numéro d\'annonce',
|
||||||
|
'naffaire'=>'Numéro d\'affaire',
|
||||||
|
'txt'=>'Recherche');
|
||||||
|
$strCriteres = '';
|
||||||
|
foreach ($parametresTxt as $key => $param)
|
||||||
|
{
|
||||||
|
if($_SESSION['recherchehisto'][$key]!='' && $param!='')
|
||||||
|
{
|
||||||
|
$strCriteres.= $param.' : '.$_SESSION['recherchehisto'][$key].' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $O['nbReponses']==0)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<p class="StyleInfoLib">
|
||||||
|
Pas de résultat affiché avec le(s) critère(s) <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce"><?=$strCriteres?></a>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$reponses = $O['reponses'];
|
||||||
|
$mots = $O['mots'];
|
||||||
|
|
||||||
|
echo '<p class="StyleInfoLib">';
|
||||||
|
echo $O['nbReponsesTotal'].' réponses. avec les critères <a title="Retour au formulaire de recherche" href="./index.php?page=recherche&vue=annonce">'.$strCriteres.'</a>';
|
||||||
|
if ($O['nbReponses']<$O['nbReponsesTotal'])
|
||||||
|
{
|
||||||
|
$totPage = ceil($O['nbReponsesTotal']/$O['nbReponses']);
|
||||||
|
$curPage = ceil($p/$O['nbReponses'])+1;
|
||||||
|
echo $_SESSION['tabInfo']['nbReponses'].' résultats affichés.';
|
||||||
|
echo 'Page '.$curPage.'/'.$totPage.'.';
|
||||||
|
$prec = $p-$_SESSION['tabInfo']['nbReponses'];
|
||||||
|
$suiv = $p+$_SESSION['tabInfo']['nbReponses'];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$totPage = $curPage = 1;
|
||||||
|
}
|
||||||
|
echo '</p>';
|
||||||
|
|
||||||
|
if($p>=200)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<p>Merci d'affiner votre recherche.</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<ol>
|
||||||
|
<?php
|
||||||
|
$indice;
|
||||||
|
foreach( $reponses as $reponse )
|
||||||
|
{
|
||||||
|
$indice++;
|
||||||
|
?>
|
||||||
|
<li type="1" value="<?=$p+$indice?>">
|
||||||
|
<?php
|
||||||
|
$texte = $reponse['Texte'];
|
||||||
|
foreach( $mots as $mot ){ $texte = preg_replace('/'.$mot.'/i', '<b>'.strtoupper($mot).'</b>', $texte);}
|
||||||
|
|
||||||
|
if( substr($reponse['Code'],0,3)=='BOD' )
|
||||||
|
{
|
||||||
|
print '<u>BODACC :</u> '.substr($reponse['Code'],3,1);
|
||||||
|
}
|
||||||
|
print ' ';
|
||||||
|
print '<u>Année :</u> '.$reponse['Annee'];
|
||||||
|
print '<br/>';
|
||||||
|
print '... '.$texte.' ...';
|
||||||
|
print '<br/>';
|
||||||
|
print '<a href="'.$reponse['Fichier'].'" target="_blank">Télécharger la page en PDF</a>';
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ol>
|
||||||
|
<?php
|
||||||
|
//Page précédentes
|
||||||
|
if($curPage>1)
|
||||||
|
{
|
||||||
|
print '<a href="./index.php?page=recherche&vue=annoncelist&p='.$prec.'">Page précédente</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<< Page : <?=$curPage.'/'.$totPage?> >>
|
||||||
|
<?php
|
||||||
|
//Page suivante
|
||||||
|
if ($curPage<$totPage)
|
||||||
|
{
|
||||||
|
print '<a href="./index.php?page=recherche&vue=annoncelist&p='.$suiv.'">Page suivante</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
@ -1,90 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function block_annonces($wsresult)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$annonces = tri_annonces($wsresult);
|
|
||||||
$firephp->log($annonces, 'annonces');
|
|
||||||
$Siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
|
||||||
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'ANNONCES LÉGALES';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
$i = -1;
|
|
||||||
|
|
||||||
//Annonces BODACC
|
|
||||||
if(count($annonces['bodacc'])>0)
|
|
||||||
{
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'EVÉNEMENTS LÉGAUX';
|
|
||||||
$lignes = array();
|
|
||||||
foreach ($annonces['bodacc'] as $ann)
|
|
||||||
{
|
|
||||||
$lignes[] = format_content( 'Bodacc' , array('Siret'=>$Siret, 'id'=>$ann['id'], 'evenements'=>$ann['evenements'], 'dateEffet'=>$ann['dateEffet'], 'DateParution'=>$ann['DateParution'], 'BodaccCode'=>$ann['BodaccCode'], 'BodaccNum'=>$ann['BodaccNum'] ) );
|
|
||||||
}
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Annonces BALO
|
|
||||||
if(count($annonces['balo'])>0)
|
|
||||||
{
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'BALO';
|
|
||||||
$lignes = array();
|
|
||||||
foreach ($annonces['balo'] as $ann)
|
|
||||||
{
|
|
||||||
$lignes[] = format_content( 'Balo' , array('Siret'=>$Siret, 'DateParution'=>$ann['DateParution'], 'BodaccNum'=>$ann['BodaccNum'], 'id'=>$ann['id'], 'evenements'=>$ann['evenements'], 'dateEffet'=>$ann['dateEffet']) );
|
|
||||||
}
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Annonces ASSO
|
|
||||||
if(count($annonces['asso'])>0)
|
|
||||||
{
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Associations';
|
|
||||||
$lignes = array();
|
|
||||||
foreach ($annonces['asso'] as $ann)
|
|
||||||
{
|
|
||||||
$lignes[] = format_content( 'Asso', array('Siret'=>$Siret, 'DateParution'=>$ann['DateParution'], 'BodaccNum'=>$ann['BodaccNum'], 'id'=>$ann['id'], 'evenements'=>$ann['evenements'], 'dateEffet'=>$ann['dateEffet'] ) );
|
|
||||||
}
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
}
|
|
||||||
return $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
function block_annonce($wsresult)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$Siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'ANNONCES LÉGALES';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
$i = -1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function tri_annonces($annonces)
|
|
||||||
{
|
|
||||||
$annoncesBodacc = array();
|
|
||||||
$annoncesBalo = array();
|
|
||||||
$annoncesAsso = array();
|
|
||||||
if (count($annonces)>0)
|
|
||||||
{
|
|
||||||
foreach ($annonces as $i => $ann) {
|
|
||||||
if ($ann['BodaccCode']=='BODA' || $ann['BodaccCode']=='BODB' || $ann['BodaccCode']=='BODC') {
|
|
||||||
$annoncesBodacc[] = $ann;
|
|
||||||
}elseif ($ann['BodaccCode']=='BALO') {
|
|
||||||
$annoncesBalo[] = $ann;
|
|
||||||
}elseif ($ann['BodaccCode']=='ASSO') {
|
|
||||||
$annoncesAsso[] = $ann;
|
|
||||||
}else {
|
|
||||||
$annoncesBodacc[] = $ann;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return array('bodacc'=>$annoncesBodacc, 'balo'=>$annoncesBalo, 'asso'=>$annoncesAsso);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,687 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function block_bilans($wsresult)
|
|
||||||
{
|
|
||||||
global $firephp, $ratiosEntrep, $siren;
|
|
||||||
$fileName = $siren;
|
|
||||||
|
|
||||||
$bilansInfos = $wsresult['bilansInfos'];
|
|
||||||
$ratiosInfos = $wsresult['ratiosInfos'];
|
|
||||||
$ratiosEntrep = $wsresult['ratiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $wsresult['ratiosEntrepEvol'];
|
|
||||||
$dataActif = $wsresult['dataActif'];
|
|
||||||
$dataPassif = $wsresult['dataPassif'];
|
|
||||||
$dataSIG = $wsresult['dataSIG'];
|
|
||||||
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'ÉLÉMENTS FINANCIERS - BILANS';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
|
|
||||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
$page['blocks'][$i]['titre'] = '';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'<b>Aucun bilan disponible pour cette entreprise !</b>' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Bilan actif - passif';
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$page['blocks'][$i]['table']['class'] = 'bilans';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'ACTIF' );
|
|
||||||
$nb_bilans = 5;
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
if(isset($bilansInfos[$nb_bilans-$cptBilan]['dateCloture']))
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],0,4).'<br/>'.$bilansInfos[$nb_bilans-$cptBilan]['duree'].'mois' );
|
|
||||||
}else{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>'-' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'content'=>'% T.B.' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'thead'=>true, 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Actif Immobilisé Net' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r59') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r59','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Incorporelles' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r51') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r51','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Corporelles' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r52') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r52','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Financières' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r53') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r53','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Actif Circulant Net' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r69') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r69','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Stock et encours' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r60') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r60','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Créances Clients' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r61') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r61','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Autres Créances' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r62') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r62','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'content'=>'' );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'content'=>'' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Trésorerie Active' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r63') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r62','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'TOTAL ACTIF' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r22') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r22','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
//TODO : nom de fichier pour le graphique
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'class'=>'graph', 'colspan'=>'7', 'content'=>bilans_graph_actif($dataActif, $fileName) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$page['blocks'][$i]['table']['class'] = 'bilans';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'PASSIF' );
|
|
||||||
$nb_bilans = 5;
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
if(isset($bilansInfos[$nb_bilans-$cptBilan]['dateCloture']))
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],0,4).'<br/>'.$bilansInfos[$nb_bilans-$cptBilan]['duree'].'mois' );
|
|
||||||
}else{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>'-' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'content'=>'% T.B.' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'thead'=>true, 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Ressources Propres' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r79') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r79','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Fonds Propres' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r70') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r70','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Provisions Risques' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r71') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r71','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Comptes Courants' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r72') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r72','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Ressources Externes' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r90') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r90','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Dettes Financières' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r83') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r83','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Dettes Fournisseurs' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r84') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r84','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Dettes Fiscales' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r85') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r85','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Autres Dettes' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r86') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r86','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'Trésorerie Passive' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r87') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r87','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'TOTAL PASSIF' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r22') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r22','r22') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'class'=>'graph', 'colspan'=>'7', 'content'=>bilans_graph_passif($dataPassif, $fileName) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Soldes Intermédiare de Gestion';
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$page['blocks'][$i]['table']['class'] = 'bilans';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'content'=>'SOLDES INTERMEDIAIRES DE GESTION' );
|
|
||||||
$nb_bilans = 5;
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
if(isset($bilansInfos[$nb_bilans-$cptBilan]['dateCloture']))
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],6,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],4,2).'/'.substr($bilansInfos[$nb_bilans-$cptBilan]['dateCloture'],0,4).'<br/>'.$bilansInfos[$nb_bilans-$cptBilan]['duree'].'mois' );
|
|
||||||
}else{
|
|
||||||
$lignes[] = array( 'class'=>'date', 'content'=>'-' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'content'=>'% C.A' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'thead'=>true, 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'CHIFFRE D\'AFFAIRES HORS TAXE' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r101') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r101','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Achat de marchandises, de matières premières' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r102') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r102','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'MARGE COMMERCIALE' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r110') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r110','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Production vendue' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r111') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r111','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Production immobilisée et stockée' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r112') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r112','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'PRODUCTION DE L\'EXERCICE' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r120') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r120','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'±' );
|
|
||||||
$lignes[] = array( 'content'=>'Variation de stock de marchandises et matières premières' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r121') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r121','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'MARGE BRUTE' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r122') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r122','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Autres charges externes' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r123') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r123','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'VALEUR AJOUTÉE' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r130') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r130','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Charges de personnel' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r132') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r132','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Impôts, taxes & versements assimilés' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r133') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r133','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Subventions d\'exploitation' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r131') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r131','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'EXCÉDENT BRUT D\'EXPLOITATION (EBE)' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r140') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r140','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Autres produits d\'exploitation' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r141') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r141','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Autres charges d\'exploitation' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r142') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r142','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Reprise sur dotations & transferts de charges' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r143') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r143','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'70% Loyer de crédit bail' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r144') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r144','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Dotations d\'exploitation & provisions d\'exploitation' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r145') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r145','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'RÉSULTAT D\'EXPLOITATION' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r150') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r150','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Produits financiers' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r151') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r151','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'30% Loyer de crédit bail' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r152') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r152','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Charges financières' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r153') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r153','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'RÉSULTAT COURANT AVANT IMPOTS' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r170') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r170','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'+' );
|
|
||||||
$lignes[] = array( 'content'=>'Produits exceptionnels' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r171') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r171','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Charges exceptionnelles' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r172') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r172','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Impôts sur les bénéfices' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r181') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r181','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'-' );
|
|
||||||
$lignes[] = array( 'content'=>'Participation salariale' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r182') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r182','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'class'=>'center', 'content'=>'RÉSULTAT NET' );
|
|
||||||
for($cptBilan=1; $cptBilan<=$nb_bilans; $cptBilan++)
|
|
||||||
{
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dRatio($nb_bilans-$cptBilan,'r199') );
|
|
||||||
}
|
|
||||||
$lignes[] = array( 'class'=>'right', 'content'=>dPercent(0,'r199','r101') );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'class'=>'subhead', 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'class'=>'graph', 'colspan'=>'8', 'content'=>bilans_graph_sig($dataSIG, $fileName) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
}
|
|
||||||
|
|
||||||
return $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function theme_bblocks($blocks)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$html = '';
|
|
||||||
if(count($blocks)>0)
|
|
||||||
{
|
|
||||||
foreach( $blocks as $key => $element )
|
|
||||||
{
|
|
||||||
if( isset($element['titre']) && $element['titre']!='' )
|
|
||||||
{
|
|
||||||
$html.= theme_blocktitre($element['titre']);
|
|
||||||
}
|
|
||||||
elseif( isset($element['table']) )
|
|
||||||
{
|
|
||||||
$html.= theme_table($element['table']);
|
|
||||||
}
|
|
||||||
//TODO : Optimiser les options pour le div
|
|
||||||
elseif( isset($element['div']) )
|
|
||||||
{
|
|
||||||
$html.= theme_div($element['div']['content']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function theme_blocktitre($content)
|
|
||||||
{
|
|
||||||
return '<h2>'.$content.'</h2>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function theme_table($table)
|
|
||||||
{
|
|
||||||
$html = '<table';
|
|
||||||
if(isset($table['id']) && $table['id']!=''){ $html.= ' id="'.$table['id'].'"'; }
|
|
||||||
if(isset($table['titre']) && $table['titre']!=''){ $html.= ' title="'.$table['titre'].'"'; }
|
|
||||||
if(isset($table['class']) && $table['class']!=''){ $html.= ' class="'.$table['class'].'"'; }
|
|
||||||
$html.= '>';
|
|
||||||
$tbody = 0;
|
|
||||||
foreach($table['row'] as $row)
|
|
||||||
{
|
|
||||||
//TODO: initialiser les variables
|
|
||||||
if(isset($row['thead']))
|
|
||||||
{
|
|
||||||
$html.= '<thead>'."\n";
|
|
||||||
$html.= theme_tablehead($row)."\n";
|
|
||||||
$html.= '</thead>'."\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( $tbody == 0 ) { $html.= '<tbody>'."\n"; }
|
|
||||||
$html.= theme_tablerow($row);
|
|
||||||
$tbody++;
|
|
||||||
if($tbody==count($table['row'])){ $html.= '</tbody>'."\n"; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html.= '</table>';
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function theme_tablehead($row)
|
|
||||||
{
|
|
||||||
$html.= '<tr';
|
|
||||||
if(isset($row['id']) && $row['id']!=''){ $html.= ' id="'.$row['id'].'"'; }
|
|
||||||
if(isset($row['titre']) && $row['titre']!=''){ $html.= ' title="'.$row['titre'].'"'; }
|
|
||||||
if(isset($row['class']) && $row['class']!=''){ $html.= ' class="'.$row['class'].'"'; }
|
|
||||||
$html.= '>'."\n";
|
|
||||||
foreach($row['content'] as $item)
|
|
||||||
{
|
|
||||||
$html.= '<th';
|
|
||||||
if(isset($item['id']) && $item['id']!=''){ $html.= ' id="'.$item['id'].'"'; }
|
|
||||||
if(isset($item['titre']) && $item['titre']!=''){ $html.= ' title="'.$item['titre'].'"'; }
|
|
||||||
if(isset($item['class']) && $item['class']!=''){ $html.= ' class="'.$item['class'].'"'; }
|
|
||||||
if(isset($item['colspan']) && $item['colspan']!=''){ $html.= ' colspan="'.$item['colspan'].'"'; }
|
|
||||||
if(isset($item['width']) && $item['width']!=''){ $html.= ' width="'.$item['width'].'"'; }
|
|
||||||
$html.= '>'.$item['content'].'</th>'."\n";
|
|
||||||
}
|
|
||||||
$html.= '</tr>'."\n";
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function theme_tablerow($row)
|
|
||||||
{
|
|
||||||
$html.= '<tr';
|
|
||||||
if(isset($row['id']) && $row['id']!=''){ $html.= ' id="'.$row['id'].'"'; }
|
|
||||||
if(isset($row['titre']) && $row['titre']!=''){ $html.= ' title="'.$row['titre'].'"'; }
|
|
||||||
if(isset($row['class']) && $row['class']!=''){ $html.= ' class="'.$row['class'].'"'; }
|
|
||||||
if(isset($row['width']) && $row['width']!=''){ $html.= ' width="'.$row['width'].'"'; }
|
|
||||||
$html.= '>'."\n";
|
|
||||||
foreach($row['content'] as $item)
|
|
||||||
{
|
|
||||||
$html.= '<td';
|
|
||||||
if(isset($item['id']) && $item['id']!=''){ $html.= ' id="'.$item['id'].'"'; }
|
|
||||||
if(isset($item['titre']) && $item['titre']!=''){ $html.= ' title="'.$item['titre'].'"'; }
|
|
||||||
if(isset($item['class']) && $item['class']!=''){ $html.= ' class="'.$item['class'].'"'; }
|
|
||||||
if(isset($item['colspan']) && $item['colspan']!=''){ $html.= ' colspan="'.$item['colspan'].'"'; }
|
|
||||||
$html.= '>'.$item['content'].'</td>'."\n";
|
|
||||||
}
|
|
||||||
$html.= '</tr>'."\n";
|
|
||||||
return $html;
|
|
||||||
}
|
|
@ -1,766 +0,0 @@
|
|||||||
<?php
|
|
||||||
function format_content($key, $parametres)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$func = 'info_'.strtolower($key);
|
|
||||||
//if ( function_exits($func) )
|
|
||||||
$return = $func($parametres);
|
|
||||||
//else
|
|
||||||
// $return = FALSE;
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_siret($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Numéro identifiant Siret';
|
|
||||||
$val = substr($Siret,0,3).' '.substr($Siret,3,3).' '.substr($Siret,6,3).' <i>'.substr($Siret,9,5).'</i>';
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_siretsiege($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Numéro identifiant Siret du siège';
|
|
||||||
$val = substr($SiretSiege,0,3).' '.substr($SiretSiege,3,3).' '.substr($SiretSiege,6,3).' <i>'.substr($SiretSiege,9,5).'</i>';
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_tvanumero($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Numéro de TVA Intracom.';
|
|
||||||
if($Dept*1==97)
|
|
||||||
{
|
|
||||||
$val = '<a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31991L0680:FR:HTML" target="_blank">Non attribué dans les D.O.M.</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$val = substr($TvaNumero,0,2).' '.substr($TvaNumero,2,2).' '.substr($TvaNumero,-9);
|
|
||||||
if (!$TvaAttribue)
|
|
||||||
$val.= ' <img src="./img/exclamation.png" title="Non validé. Obligatoire sur factures, déclarations d\'échange de biens et de TVA !">';
|
|
||||||
}
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_isin($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Code ISIN';
|
|
||||||
$return = FALSE;
|
|
||||||
if( $Isin != '' )
|
|
||||||
{
|
|
||||||
$val = '<a href="./?page=bourse&siret='.$Siret.'" title="Voir les informations boursiéres">'.$Isin.'</a>';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_capitalisation($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = FALSE;
|
|
||||||
$lib = 'Capitalisation';
|
|
||||||
if( $Isin!='' && $Bourse['capitalisation']!= 0 )
|
|
||||||
{
|
|
||||||
$val = number_format($Bourse['capitalisation'],0,'', ' ').' € au '.WDate::dateT('Y-m-d','d/m/Y',$Bourse['derCoursDate']);
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_logo()
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Logo';
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_numrc($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = FALSE;
|
|
||||||
if( isset($NumRC) && $NumRC!='')
|
|
||||||
{
|
|
||||||
$lib = 'Numéro R.C';
|
|
||||||
$val = $NumRC;
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_autreid($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = FALSE;
|
|
||||||
if (isset($AutreId) && $AutreId!='' && (!(isset($NumRC) && $NumRC!='') || substr($AutreId,0,1)=='W'))
|
|
||||||
{
|
|
||||||
if (substr($AutreId,0,1)=='W')
|
|
||||||
{
|
|
||||||
$lib = 'Identifiant Association WALDEC';
|
|
||||||
$val = $AutreId;
|
|
||||||
}
|
|
||||||
elseif (preg_match('/(A|B|C|D)/i', $AutreId))
|
|
||||||
{
|
|
||||||
$lib = 'Numéro R.C.';
|
|
||||||
$val = $AutreId.' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$TribunalLib);
|
|
||||||
}
|
|
||||||
elseif (preg_match('/(P)/i', $etab['AutreId']))
|
|
||||||
{
|
|
||||||
$lib = 'Numéro R.S.A.C.';
|
|
||||||
$val = $AutreId.' RSAC '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$TribunalLib);
|
|
||||||
}
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_actif($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Etablissement actif';
|
|
||||||
if ($Siege==0)
|
|
||||||
{
|
|
||||||
$lib.= '<br/><a title="Voir la fiche d\'identité du siège de l\'entreprise" href="/?page=identite&siret='.$Siren.'&idEntreprise='.$idEntreprise.'">Accès à la fiche du siège</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($Actif==1) $val = 'Oui';
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$val = '<b>NON</b>';
|
|
||||||
$dateCloture = str_replace('-','',$DateClotEt);
|
|
||||||
if ($dateCloture!='')
|
|
||||||
$val.= '<i> (Fin d\'activité en '.WDate::dateT('Ymd', 'm/Y', $dateCloture).')</i>';
|
|
||||||
}
|
|
||||||
if ($Siren*1!=0 && preg_match('/AVISINSEE/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
$val.= ' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret='.$Siret.'">(Situation au répertoire SIRENE)</a>';
|
|
||||||
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_situationjuridique($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Situation juridique';
|
|
||||||
$dateRadiation = '';
|
|
||||||
if(isset($DateRadiation) && $DateRadiation!='' && $DateRadiation!='0000-00-00'){
|
|
||||||
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$DateRadiation));
|
|
||||||
}
|
|
||||||
$val = '';
|
|
||||||
//Procédure collective
|
|
||||||
if ($etab['SituationJuridique']=='P')
|
|
||||||
{
|
|
||||||
$val = '<a href="./?page=annonces&siret='.$Siret.'&idEntreprise='.$idEntreprise.'"><font color="red"><b>En procédure collective</b></font></a>';
|
|
||||||
if($dateRadiation!=''){ $val.= '<br/>Radié du RCS le '.$dateRadiation; }
|
|
||||||
}
|
|
||||||
//Radiation
|
|
||||||
if($etab['SituationJuridique']=='RR')
|
|
||||||
{
|
|
||||||
$val = 'Radié du RCS ';
|
|
||||||
if($dateRadiation!=''){ $val.=' le '.$dateRadiation; }
|
|
||||||
}
|
|
||||||
elseif($etab['SituationJuridique']=='RP')
|
|
||||||
{
|
|
||||||
$val = 'Radiation publiée ';
|
|
||||||
if($dateRadiation!=''){ $val.=' le '.$dateRadiation; }
|
|
||||||
}
|
|
||||||
if ($_SESSION['tabInfo']['mode_edition']==1)
|
|
||||||
{
|
|
||||||
$val.='<a href="./?page=saisie&siret='.$Siret.'&idEntreprise='.$idEntreprise.'">(Edition)</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $SituationJuridique=='P' || $SituationJuridique[0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
|
||||||
{
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}else{
|
|
||||||
$return = FALSE;
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_bodacc($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = '<span id="annoncesDate">Le '.WDate::dateT('Y-m-d','d/m/Y',$DateParution).'</span>';
|
|
||||||
$lib.= '<span id="annoncesImg">';
|
|
||||||
|
|
||||||
$tabSource=explode('-', $BodaccCode);
|
|
||||||
$source=$tabSource[0];
|
|
||||||
$idSource=@$tabSource[1];
|
|
||||||
if ($source[0] == 'B'){
|
|
||||||
$lib.= '<img src="./img/logo_jo.png" title="Source BODACC '.$BodaccNum.' '.substr($source,-1).' '.substr($DateParution,0,4).'"/>';
|
|
||||||
}elseif ($source[0] == 'G' || $source[0] == 'T'){
|
|
||||||
$lib.= '<img src="./img/logo_greffe.png" title="Source Collecte Greffe"/>';
|
|
||||||
}elseif ($source[0] == 'P'){
|
|
||||||
$lib.= '<img src="./img/logo_inpi.png" title="Source Collecte RNCS"/>';
|
|
||||||
}else{
|
|
||||||
$lib.= '<img src="./img/logo_jal.png" title="Source Collecte JAL';
|
|
||||||
if ($idSource>0) $html.= ' '.$idSource;
|
|
||||||
$lib.= '"/>';
|
|
||||||
}
|
|
||||||
$lib.= '</span>';
|
|
||||||
|
|
||||||
$val .= '<a href="/?page=annonces&siret='.$Siret.'&idan='.$id.'&vue=bodacc">';
|
|
||||||
foreach ($evenements as $i=>$even) {
|
|
||||||
$val.= $even['LibEven'];
|
|
||||||
$numEven=$even['CodeEven']*1;
|
|
||||||
if ($numEven>3000 && $numEven<3999) $val.= ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$dateEffet).')';
|
|
||||||
$val.= '<br/>';
|
|
||||||
}
|
|
||||||
$val.='</a>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_balo($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = '<span id="annoncesDate">Le '.WDate::dateT('Y-m-d','d/m/Y',$DateParution).'</span>';
|
|
||||||
$lib.= '<span id="annoncesImg">';
|
|
||||||
$lib.= '<img src="./img/logo_jo.png" title="Source BALO n°'.$ann['BodaccNum'].'"/>';
|
|
||||||
$lib.= '</span>';
|
|
||||||
|
|
||||||
$val = '<a href="/?page=annonces&siret='.$Siret.'&idan='.$id.'&vue=balo">';
|
|
||||||
foreach ($evenements as $i=>$even) {
|
|
||||||
$val.= $even['LibEven'];
|
|
||||||
$numEven=$even['CodeEven']*1;
|
|
||||||
if ($numEven>3000 && $numEven<3999) print ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$dateEffet).')';
|
|
||||||
$val.= '<br/>';
|
|
||||||
}
|
|
||||||
$val.='</a>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_asso($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = '<span id="annoncesDate">Le '.WDate::dateT('Y-m-d','d/m/Y',$DateParution).'</span>';
|
|
||||||
$lib.= '<span id="annoncesImg">';
|
|
||||||
$lib.= '<img src="./img/logo_jo.png" title="Source JO ASSOCIATION n°'.$BodaccNum.'"/>';
|
|
||||||
$lib.= '</span>';
|
|
||||||
|
|
||||||
|
|
||||||
$val.= '<a href="/?page=annonces&siret='.$Siret.'&idan='.$id.'&vue=asso">';
|
|
||||||
foreach ($evenements as $i=>$even) {
|
|
||||||
$val.= $even['LibEven'];
|
|
||||||
$numEven=$even['CodeEven']*1;
|
|
||||||
if ($numEven>3000 && $numEven<3999) $val.= ' (clôture au '.WDate::dateT('Y-m-d','d/m/Y',$dateEffet).')';
|
|
||||||
$val.= '<br/>';
|
|
||||||
}
|
|
||||||
$val.= '</a>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_raisonsociale($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$title = '';
|
|
||||||
if(isset($NomLong) && $NomLong!='' && $NomLong!=$Nom ) $title = $NomLong;
|
|
||||||
|
|
||||||
$lib = 'Raison Sociale';
|
|
||||||
|
|
||||||
$val = '<span title="'.$title.'">'.$Nom;
|
|
||||||
if ($Nom2!='') $val.= '<br/>'.$Nom2;
|
|
||||||
$val.= '</span>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function info_enseignesigle($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$titre = '';
|
|
||||||
if ($Enseigne!='' && $Sigle!='')
|
|
||||||
{
|
|
||||||
$titre='Enseigne / Sigle';
|
|
||||||
$val=$etab['Enseigne'].' / '.$etab['Sigle'];
|
|
||||||
}
|
|
||||||
elseif($Enseigne!='' && $Sigle=='' && $SigleLong!='' )
|
|
||||||
{
|
|
||||||
$titre='Enseigne / Sigle';
|
|
||||||
$val=$Enseigne.' / '.$SigleLong;
|
|
||||||
}
|
|
||||||
elseif($Enseigne!='' && $Sigle=='')
|
|
||||||
{
|
|
||||||
$titre='Enseigne';
|
|
||||||
$val=$Enseigne;
|
|
||||||
}
|
|
||||||
elseif($Enseigne=='' && $Sigle!='')
|
|
||||||
{
|
|
||||||
$titre='Sigle';
|
|
||||||
$val=$Sigle;
|
|
||||||
}
|
|
||||||
elseif($Enseigne=='' && $Sigle=='' && $SigleLong!='')
|
|
||||||
{
|
|
||||||
$titre='Sigle';
|
|
||||||
$val=$SigleLong;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = '';
|
|
||||||
if( isset($SigleLong) && $SigleLong!='' && $SigleLong!=$Sigle)
|
|
||||||
{
|
|
||||||
$title = $SigleLong;
|
|
||||||
}
|
|
||||||
|
|
||||||
$return = FALSE;
|
|
||||||
if ($titre!='')
|
|
||||||
{
|
|
||||||
$lib = $titre;
|
|
||||||
$val = '<span title="'.$title.'">'.$val.'</span>';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_formejuridique($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = 'Forme Juridique';
|
|
||||||
|
|
||||||
$val = $FJ.' : '.strWsToHtml($FJ_lib);
|
|
||||||
if(isset($FJ2) && $FJ2!='' && isset($FJ2_Lib) && $FJ2_Lib!='')
|
|
||||||
{
|
|
||||||
$val.= '<img src="./img/exclamation.png" title="Forme jurique au RCS : '.$FJ2_Lib.' ('.$FJ2.')"/>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_immatriculation($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$dateImmat = '';
|
|
||||||
if(isset($DateImmat) && $DateImmat!='' && $DateImmat!='0000-00-00')
|
|
||||||
{
|
|
||||||
$dateImmat = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$DateImmat));
|
|
||||||
}
|
|
||||||
$return = FALSE;
|
|
||||||
if($dateImmat!='')
|
|
||||||
{
|
|
||||||
$lib = 'Date d\'immatriculation';
|
|
||||||
$val = $dateImmat;
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_creationentreprise($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = 'Création de l\'entreprise';
|
|
||||||
|
|
||||||
$dateCreationEn=str_replace('-','',$DateCreaEn);
|
|
||||||
if (substr($dateCreationEn,-2)*1==0)
|
|
||||||
$val = WDate::dateT('Ymd', 'm/Y', $dateCreationEn);
|
|
||||||
else
|
|
||||||
$val = WDate::dateT('Ymd', 'd/m/Y', $dateCreationEn);
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_creationetablissement($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = 'Création de l\'établissement';
|
|
||||||
|
|
||||||
$dateCreationEt=str_replace('-','',$DateCreaEt);
|
|
||||||
if ($dateCreationEt*1<>0) {
|
|
||||||
if (substr($dateCreationEt,-2)*1==0)
|
|
||||||
$val = WDate::dateT('Ymd', 'm/Y', $dateCreationEt);
|
|
||||||
else
|
|
||||||
$val = WDate::dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
|
||||||
} else $val = 'N/C';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_adresse($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = 'Adresse';
|
|
||||||
|
|
||||||
if($AdresseRue == ''){ $voie = $Adresse2; }else{ $voie = $AdresseRue; }
|
|
||||||
|
|
||||||
$val = '<a href="/?page=recherche&vue=list&formR[type]=ent&formR[numVoie]='.urlencode($AdresseNum).'&formR[voie]='.urlencode($voie).'&formR[cpVille]='.urlencode($CP).'" title="Rechercher à partir de cette adresse">';
|
|
||||||
$val.= '<p class="adresse">'.$Adresse.'</p>';
|
|
||||||
|
|
||||||
if (preg_match('/CHEZ SOFRADOM/i',$Adresse2))
|
|
||||||
$Adresse2 = '<a title="Voir la fiche d\'identité du domiciliataire de cette entreprise" href="/?page=identite&siret=42495045900018&idEntreprise=6720043">CHEZ SOFRADOM</a>';
|
|
||||||
if ($Adresse2!='')
|
|
||||||
$val.= '<p class="adresse">'.$Adresse2.'</p>';
|
|
||||||
|
|
||||||
$cp=$CP*1;
|
|
||||||
if ($cp<>0)
|
|
||||||
$val.= '<p class="adresse">'.$CP.' '.strWsToHtml($Ville).'</p>';
|
|
||||||
if ($Pays<>'' && strtoupper(substr($Pays,0,3))<>'FRA')
|
|
||||||
$val.= '<p class="adresse">'.strWsToHtml($Pays).'</p>';
|
|
||||||
$val.= '</a>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_zonesprioritaires($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
|
|
||||||
if ($GeoInfos['ZUS']=='OUI' ||
|
|
||||||
$GeoInfos['ZFU']=='OUI' ||
|
|
||||||
$GeoInfos['ZRU']=='OUI' ||
|
|
||||||
$GeoInfos['CUCS']=='OUI' ||
|
|
||||||
$GeoInfos['ZRR']=='OUI' ||
|
|
||||||
$GeoInfos['AFR']=='OUI')
|
|
||||||
{
|
|
||||||
$lib = 'Zones prioritaires';
|
|
||||||
|
|
||||||
$val = '';
|
|
||||||
if ($GeoInfos['ZUS']=='OUI') $val.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$GeoInfos['NZUS'].'" target="_blank">ZUS n°'.$GeoInfos['NZUS'].'</a><br/>';
|
|
||||||
if ($GeoInfos['ZFU']=='OUI') $val.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$GeoInfos['NZFU'].'" target="_blank">ZFU n°'.$GeoInfos['NZFU'].'</a><br/>';
|
|
||||||
if ($GeoInfos['ZRU']=='OUI') $val.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$GeoInfos['NZRU'].'" target="_blank">ZRU n°'.$GeoInfos['NZRU'].'</a><br/>';
|
|
||||||
if ($GeoInfos['ZRR']=='OUI') $val.= '<a href="http://www.diact.gouv.fr/IMG/Fichiers/Rural%20/ZRR/carte_zrr_20090409.pdf" target="_blank">ZRR n°'.$GeoInfos['NZRR'].'</a><br/>';
|
|
||||||
if ($GeoInfos['AFR']=='OUI') $val.= '<a href="http://www.diact.gouv.fr/IMG/Fichiers/AFR/com_fr_AFR0907.pdf" target="_blank">AFR n°'.$GeoInfos['NAFR'].'</a><br/>';
|
|
||||||
if ($GeoInfos['CUCS']=='OUI') $val.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$GeoInfos['NCUCS'].'" target="_blank">CUCS n°'.$GeoInfos['NCUCS'];
|
|
||||||
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_telephone($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$lib = 'Téléphone';
|
|
||||||
|
|
||||||
|
|
||||||
$val = '<div class="txtAdresse">';
|
|
||||||
$val.= '<p>';
|
|
||||||
|
|
||||||
if (trim($Tel)=='') $val.= 'N/C';
|
|
||||||
else $val.= $Tel;
|
|
||||||
|
|
||||||
if ($Enseigne!='') $libNom=urlencode($Enseigne);
|
|
||||||
else $libNom=urlencode($Nom);
|
|
||||||
$adresse=$Adresse;
|
|
||||||
$i_adr=0;
|
|
||||||
while (substr($adresse,0,1)=='0')
|
|
||||||
{
|
|
||||||
$i_adr++;
|
|
||||||
$adresse=substr($adresse,1,strlen($adresse)-1);
|
|
||||||
if ($i_adr>4) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$val.= '<a title="Rechercher le numéro de téléphone dans l\'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom='.$libNom.'&adr='.urlencode(utf8_decode($adresse)).'&loc='.urlencode(utf8_decode($CP.' '.$Ville)).'&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a></p>';
|
|
||||||
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_fax($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if ($Fax*1>0)
|
|
||||||
{
|
|
||||||
$lib = 'Fax';
|
|
||||||
$val = $Fax;
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_siteweb($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if (trim($Web)!='') {
|
|
||||||
if (substr($Web,0,7)!='http://') $siteWeb='http://'.$Web;
|
|
||||||
else $siteWeb=$Web;
|
|
||||||
}
|
|
||||||
if ($siteWeb!='')
|
|
||||||
{
|
|
||||||
$lib = 'Site Internet';
|
|
||||||
$val = '<a href="'.$siteWeb.'" target="_blank">'.$siteWeb.'</a>';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_email($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if (trim($Mail)!='')
|
|
||||||
{
|
|
||||||
$lib = 'Courriel';
|
|
||||||
$val = '<a href="mailto:'.$Mail.'" target="_blank">'.$Mail.'</a>';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_activiteentreprise($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Activité de l\'entreprise';
|
|
||||||
|
|
||||||
if ($Activite!='' && !preg_match('/non pr(e|é)cis(e|é)/i',utf8_decode($Activite))) {
|
|
||||||
$texte=preg_replace_callback("/((?:[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, strWsToHtml($Activite));
|
|
||||||
$val = $texte.' ('.$NafEnt.' : '. strWsToHtml($NafEntLib).')';
|
|
||||||
} else {
|
|
||||||
$val = $NafEnt.' : '. strWsToHtml($NafEntLib);
|
|
||||||
}
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_activiteetablissement($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$lib = 'Activité de l\'établissement';
|
|
||||||
$val = $NafEtab.' : '. strWsToHtml($NafEtabLib);
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_naf4($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$return = false;
|
|
||||||
if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim($Naf4Ent)!='')
|
|
||||||
{
|
|
||||||
$lib = 'Anciens codes NAF';
|
|
||||||
$val = '<b>Entr. : </b>'.$Naf4Ent.' - '.strWsToHtml($Naf4EntLib).'<br/><b>Étab. :</b> '.$Naf4Etab.' - '. strWsToHtml($Naf4EtabLib);
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_natureactivite($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if ($NatureActivite==1 && $Actif==1)
|
|
||||||
{
|
|
||||||
$lib = 'Nature de l\'activité';
|
|
||||||
$val = 'Saisonnière';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_originefond($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if ( ($OrigineCreation*1>0 && $OrigineCreation*1<9) || $OrigineCreation=='A' || $OrigineCreation=='B' || $OrigineCreation=='C' || $OrigineCreation=='D' || $OrigineCreation=='E' )
|
|
||||||
{
|
|
||||||
$tabCreation=array( 'a1'=>'Création',
|
|
||||||
'a3'=>'Achat',
|
|
||||||
'a4'=>'Apport',
|
|
||||||
'a6'=>'Prise en location gérance',
|
|
||||||
'a7'=>'Partage',
|
|
||||||
'a8'=>'Reprise',
|
|
||||||
'aA'=>'Reprise globale de l\'exploitation agricole',
|
|
||||||
'aB'=>'Poursuite de l\'exploitation agricole par le conjoint',
|
|
||||||
'aC'=>'Transfert de propriété de l\'exploitation agricole',
|
|
||||||
'aD'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)',
|
|
||||||
'aE'=>'Reprise d\'exploitation agricole individuelle',
|
|
||||||
);
|
|
||||||
$lib ='Origine du fonds';
|
|
||||||
$val = $tabCreation['a'.$OrigineCreation];
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO : A simplifier
|
|
||||||
function info_nbetabactif($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if ($NbEtab!='N/C')
|
|
||||||
{
|
|
||||||
$lib = 'Nombre d\'établissements actifs';
|
|
||||||
$val = '<a title="Voir la liste des établissements" href="/?page=etablissements&siret='.$Siret.'&idEntreprise='.$idEntreprise.'">'.number_format($NbEtab*1,null,null,' ').'</a>';
|
|
||||||
if ($NbEtab*1>1)
|
|
||||||
{
|
|
||||||
$val.= ' <a title="Voir la liste des établissements" href="/?page=etablissements&siret='.$Siret.'&idEntreprise='.$idEntreprise.'">(Liste)</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_capital($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$return = false;
|
|
||||||
if (isset($Capital) && $Capital*1>0)
|
|
||||||
{
|
|
||||||
$title = '';
|
|
||||||
if(isset($Bilan['Capital'])) $title.='Capital de '.moneyKM($Bilan['Capital']).deviseText($Bilan['Devise']);
|
|
||||||
if(isset($Bilan['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Bilan['Cloture']));
|
|
||||||
|
|
||||||
$lib = 'Capital';
|
|
||||||
if (isset($CapitalType) && $CapitalType=='V'){ $lib.= 'variable'; }
|
|
||||||
|
|
||||||
$val = '<span title="'.$title.'">'.number_format($Capital,0,',',' ').' ';
|
|
||||||
if ($CapitalDev=='EUR') { $val.= '€'; }
|
|
||||||
else {
|
|
||||||
$val.= $CapitalDev.' ('.strWsToHtml($CapitalLib).')';
|
|
||||||
}
|
|
||||||
$val.= '</span>';
|
|
||||||
$return = array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_chiffreaffaire($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$title = '';
|
|
||||||
if(isset($Bilan['CA'])) $title.='Chiffre d\'affaire de '.moneyKM($Bilan['CA']).deviseText($Bilan['Devise']);
|
|
||||||
if(isset($Bilan['Resultat'])) $title.=' et Résultat de '.moneyKM($Bilan['Resultat']).deviseText($Bilan['Devise']);
|
|
||||||
if(isset($Bilan['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Bilan['Cloture']));
|
|
||||||
|
|
||||||
$lib = 'Chiffre d\'affaire';
|
|
||||||
|
|
||||||
$val = '<span title="'.$title.'">';
|
|
||||||
if(isset($Bilan['CA']) && (!isset($TrancheCALib) || $TrancheCALib=='N/C'))
|
|
||||||
{
|
|
||||||
$val.= moneyKM($Bilan['CA']).deviseText($Bilan['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Bilan['Cloture']));
|
|
||||||
}elseif(isset($TrancheCALib) && $TrancheCALib!='N/C'){
|
|
||||||
$val.= strWsToHtml($TrancheCALib);
|
|
||||||
}else{
|
|
||||||
$val.= 'N/C';
|
|
||||||
}
|
|
||||||
$val.= '</span>';
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_dirigeants($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
|
|
||||||
$dir1DateNaiss = '';
|
|
||||||
if(isset($dir1DateNaiss) && $dir1DateNaiss!='' && $dir1DateNaiss!='0000-00-00'){
|
|
||||||
$dir1DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$dir1DateNaiss));
|
|
||||||
}
|
|
||||||
$dir1LieuNaiss = '';
|
|
||||||
if(isset($dir1LieuNaiss) && $dir1LieuNaiss!=''){
|
|
||||||
$dir1LieuNaiss = $dir1LieuNaiss;
|
|
||||||
}
|
|
||||||
$dir2DateNaiss = '';
|
|
||||||
if(isset($dir2DateNaiss) && $dir2DateNaiss!='' && $dir2DateNaiss!='0000-00-00'){
|
|
||||||
$dir2DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$dir2DateNaiss));
|
|
||||||
}
|
|
||||||
$dir2LieuNaiss = '';
|
|
||||||
if(isset($dir2LieuNaiss) && $dir2LieuNaiss!=''){
|
|
||||||
$dir2LieuNaiss = $dir2LieuNaiss;
|
|
||||||
}
|
|
||||||
$dir1NaissText = '';
|
|
||||||
if($dir1DateNaiss!='') $dir1NaissText.= 'né(e) le '.$dir1DateNaiss;
|
|
||||||
if($dir1LieuNaiss!='' && $dir1NaissText!='') $dir1NaissText.= ' à '.$dir1LieuNaiss;
|
|
||||||
elseif($dir1LieuNaiss!='' && $dir1NaissText=='') $dir1NaissText.= 'né(e) à '.$dir1LieuNaiss;
|
|
||||||
$dir2NaissText = '';
|
|
||||||
if($dir2DateNaiss!='') $dir2NaissText.= 'né(e) le '.$dir2DateNaiss;
|
|
||||||
if($dir2LieuNaiss!='' && $dir2NaissText!='') $dir2NaissText.= ' à '.$dir2LieuNaiss;
|
|
||||||
elseif($dir2LieuNaiss!='' && $dir2NaissText=='') $dir2NaissText.= 'né(e) à '.$dir2LieuNaiss;
|
|
||||||
|
|
||||||
$lib = 'Principaux Dirigeants';
|
|
||||||
|
|
||||||
$val = '<div class="txtAdresse">';
|
|
||||||
$val.= '<p><u><b>'.strWsToHtml(ucfirst($dir1Titre)).'</b></u>';
|
|
||||||
$val.= '<br/>'.strWsToHtml($dir1NomPrenom);
|
|
||||||
if($dir1NaissText!=''){$val .= ', '.$dir1NaissText; }
|
|
||||||
$val .= '</p></div>';
|
|
||||||
if ($dir2Titre<>'')
|
|
||||||
{
|
|
||||||
$val.= '<br/>';
|
|
||||||
$val.= '<div class="txtAdresse">';
|
|
||||||
$val.= '<p><u><b>'.strWsToHtml(ucfirst($dir2Titre)).'</b>:</u>';
|
|
||||||
$val.= '<br/>'.strWsToHtml($dir2NomPrenom);
|
|
||||||
if($dir2NaissText!=''){$val.=', '.$dir2NaissText; }
|
|
||||||
$val.= '</p></div>';
|
|
||||||
}
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_effectif($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$title = '';
|
|
||||||
if(isset($Bilan['Effectif'])) $title.=$Bilan['Effectif'].' salarié(s)';
|
|
||||||
if(isset($Bilan['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Bilan['Cloture']));
|
|
||||||
$lib = 'Effectif de l\'entreprise';
|
|
||||||
|
|
||||||
$val = '<span title="'.$title.'">';
|
|
||||||
if( (!isset($Effectif) || $Effectif=='N/C' || $Effectif==0) && isset($Bilan['Effectif']))
|
|
||||||
{
|
|
||||||
$val.= $title;
|
|
||||||
}elseif(isset($Effectif) && $Effectif!='N/C' && $Effectif!=0 ){
|
|
||||||
$val.= number_format($Effectif*1,null,null,' ').' salarié(s)';
|
|
||||||
}else{
|
|
||||||
$val.= 'N/C';
|
|
||||||
}
|
|
||||||
return array('intitule'=>$lib, 'valeur'=>$val);
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_infogeo(){}
|
|
||||||
function info_news(){}
|
|
||||||
|
|
||||||
function info_datecloture($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
if(isset($dateCloture)) {
|
|
||||||
return substr($dateCloture,6,2).'/'.substr($dateCloture,4,2).'/'.substr($dateCloture,0,4).'<br/>'.$duree.' mois';
|
|
||||||
}else{ return '-'; }
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_ratiosmillesime($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$html = '';
|
|
||||||
$html .= '<form name="selectBilan" method="post" action="index.php?'.$_SERVER['QUERY_STRING'].'">'."\n";
|
|
||||||
$html .= '<select name="bilan">'."\n";
|
|
||||||
|
|
||||||
$countBilans = 0;
|
|
||||||
if(count($bilansInfos)>0)
|
|
||||||
{
|
|
||||||
foreach($bilansInfos as $bilanItem)
|
|
||||||
{
|
|
||||||
if(isset($bilanItem['dateCloture']))
|
|
||||||
{
|
|
||||||
$select = '';
|
|
||||||
if($bilan==$countBilans){ $select = 'selected="selected"'; }
|
|
||||||
$html.= '<option value="'.$countBilans.'" '.$select.'>'.substr($bilanItem['dateCloture'],6,2).'/'.substr($bilanItem['dateCloture'],4,2).'/'.substr($bilanItem['dateCloture'],0,4).'</option>'."\n";
|
|
||||||
}
|
|
||||||
$countBilans++;
|
|
||||||
}
|
|
||||||
}else{ $html.= '-'; }
|
|
||||||
|
|
||||||
$html .= '</select>';
|
|
||||||
$html .= ' <a href="javascript:document.selectBilan.submit();">Ok</a>';
|
|
||||||
$html .= '</form>';
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
36
includes/scoresws/functions.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
Element => Appel function lib_element
|
||||||
|
=> Appel function data_element
|
||||||
|
=> Elements de styles et paramètres
|
||||||
|
head, hidden
|
||||||
|
style : width, height, class, colspan
|
||||||
|
|
||||||
|
Une fonction bloc_nom définit le format général
|
||||||
|
On déclare la table
|
||||||
|
On déclare l'entête de la table
|
||||||
|
- Pour chaque element
|
||||||
|
  | cell | cell
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Appel la fonction qui formatte les données d'un éléments
|
||||||
|
function formatElement($module, $lib, $params)
|
||||||
|
{
|
||||||
|
$result = call_user_func_array(strtolower($module).'_'.strtolower($lib), $params);
|
||||||
|
if(is_array($result) && count($result)>0)
|
||||||
|
{
|
||||||
|
|
||||||
|
list($lib, $data, $title) = $result;
|
||||||
|
return array('lib'=>$lib, 'data'=>$data, 'title'=>$title);
|
||||||
|
|
||||||
|
}elseif(is_bool($result) && $result===false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,70 +1,646 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
|
||||||
|
|
||||||
Formatter les données provenant de la méthode getIdentite pour les transmettre
|
function identite_siret($siren, $siret)
|
||||||
à une méthode de génération de tableau
|
|
||||||
|
|
||||||
*/
|
|
||||||
function block_identite($wsresult)
|
|
||||||
{
|
{
|
||||||
$page = array();
|
$lib = 'Numéro identifiant Siret';
|
||||||
$page['titre'] = 'IDENTITÉ DE l\'ENTREPRISE';
|
$data = substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3).' <i>'.substr($siret,9,5).'</i>';
|
||||||
$page['blocks'] = array();
|
return array( $lib , $data );
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
$page['blocks'][$i]['titre'] = '';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = format_content( 'Siret' , array('Siret'=>$wsresult['Siret']) );
|
|
||||||
$lignes[] = format_content( 'SiretSiege' ,array('SiretSiege'=>$wsresult['SiretSiege']) );
|
|
||||||
$lignes[] = format_content( 'TvaNumero' , array('TvaNumero'=>$wsresult['TvaNumero'], 'Dept'=>$wsresult['Dept'], 'TvaAttribute'=>$wsresult['TvaAttribute']) );
|
|
||||||
$lignes[] = format_content( 'Isin' , array('Isin'=>$wsresult['Isin'], 'Siret'=>$wsresult['Siret']) );
|
|
||||||
$lignes[] = format_content( 'Capitalisation' , array('Bourse'=>$wsresult['Bourse'], 'Isin'=>$wsresult['Isin']) );
|
|
||||||
$lignes[] = format_content( 'Logo' , array() ); //TODO : A faire
|
|
||||||
$lignes[] = format_content( 'NumRC' , array('NumRC'=>$wsresult['NumRC']) );
|
|
||||||
$lignes[] = format_content( 'AutreId' , array('AutreId'=>$wsresult['AutreId'], 'TribunalLib'=>$wsresult['TribunalLib'], 'NumRC'=>$wsresult['NumRC']) );
|
|
||||||
$lignes[] = format_content( 'Actif' , array('Actif'=>$wsresult['Actif'], 'Siren'=>$wsresult['Siren'], 'Siret'=>$wsresult['Siret'], 'idEntreprise'=>$wsresult['id'], 'DateClotEt'=>$wsresult['DateClotEt']) );
|
|
||||||
$lignes[] = format_content( 'SituationJuridique' , array('SituationJuridique'=>$wsresult['SituationJuridique'], 'DateRadiation'=>$wsresult['DateRadiation'], 'Siret'=>$wsresult['Siret'], 'idEntreprise'=>$wsresult['idEntreprise']) );
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Raison sociale & Coordonnées';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = format_content( 'RaisonSociale' , array('NomLong'=>$wsresult['NomLong'], 'Nom'=>$wsresult['Nom'], 'Nom2'=>$wsresult['Nom2']) );
|
|
||||||
$lignes[] = format_content( 'EnseigneSigle' , array('Enseigne'=>$wsresult['Enseigne'], 'Sigle'=>$wsresult['Sigle'], 'SigleLong'=>$wsresult['SigleLong']) );
|
|
||||||
$lignes[] = format_content( 'FormeJuridique' , array('FJ'=>$wsresult['FJ'], 'FJ_lib'=>$wsresult['FJ_lib'], 'FJ2'=>$wsresult['FJ2'], 'FJ2_Lib'=>$wsresult['FJ2_Lib']) );
|
|
||||||
$lignes[] = format_content( 'Immatriculation', array('DateImmat'=>$wsresult['DateImmat']) );
|
|
||||||
$lignes[] = format_content( 'CreationEntreprise', array('DateCreaEn'=>$wsresult['DateCreaEn']));
|
|
||||||
$lignes[] = format_content( 'CreationEtablissement', array('DateCreaEt'=>$wsresult['DateCreaEn']));
|
|
||||||
$lignes[] = format_content( 'Adresse', array('Adresse'=>$wsresult['Adresse'],'AdresseRue'=>$wsresult['AdresseRue'],'Adresse2'=>$wsresult['Adresse2'],'AdresseNum'=>$wsresult['AdresseNum'],'CP'=>$wsresult['CP'],'Ville'=>$wsresult['Ville'],'Pays'=>$wsresult['Pays']) );
|
|
||||||
$lignes[] = format_content( 'ZonesPrioritaires', array('GeoInfos'=>$etab['GeoInfos']) );
|
|
||||||
$lignes[] = format_content( 'Telephone', array('Tel'=>$wsresult['Tel'],'Enseigne'=>$wsresult['Enseigne'],'Nom'=>$wsresult['Nom'],'Adresse'=>$wsresult['Adresse'],'CP'=>$wsresult['CP'],'Ville'=>$wsresult['Ville']) );
|
|
||||||
$lignes[] = format_content( 'Fax', array('Fax'=>$wsresult['Fax']) );
|
|
||||||
$lignes[] = format_content( 'SiteWeb', array('Web'=>$wsresult['Web']) );
|
|
||||||
$lignes[] = format_content( 'Email', array('Mail'=>$wsresult['Mail']) );
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Activité(s) & Chiffre d\'affaire';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = format_content( 'ActiviteEntreprise', array('Activite'=>$wsresult['Activite'],'NafEnt'=>$wsresult['NafEnt'],'NafEntLib'=>$wsresult['NafEntLib']) );
|
|
||||||
$lignes[] = format_content( 'ActiviteEtablissement', array('NafEtab'=>$wsresult['NafEtab'],'NafEtabLib'=>$wsresult['NafEtabLib']) );
|
|
||||||
$lignes[] = format_content( 'Naf4', array('Naf4Ent'=>$wsresult['Naf4Ent'],'Naf4EntLib'=>$wsresult['Naf4EntLib'],'Naf4Etab'=>$wsresult['Naf4Etab'],'Naf4EtabLib'=>$wsresult['Naf4EtabLib']) );
|
|
||||||
$lignes[] = format_content( 'NatureActivite', array('NatureActivite'=>$wsresult['NatureActivite'],'Actif'=>$wsresult['Actif']) );
|
|
||||||
$lignes[] = format_content( 'OrigineFond', array('OrigineCreation'=>$wsresult['OrigineCreation']) );
|
|
||||||
$lignes[] = format_content( 'NbEtabActif', array('NbEtab'=>$wsresult['NbEtab'],'Siret'=>$wsresult['Siret'], 'idEntreprise'=>$etab['id']) );
|
|
||||||
$lignes[] = format_content( 'Capital', array('Capital'=>$wsresult['Capital'],'Bilan'=>$wsresult['Bilan'],'CapitalType'=>$wsresult['CapitalType'],'CapitalDev'=>$wsresult['CapitalDev'],'CapitalLib'=>$wsresult['CapitalLib']) );
|
|
||||||
$lignes[] = format_content( 'ChiffreAffaire', array('Bilan'=>$wsresult['Bilan'],'TrancheCALib'=>$wsresult['TrancheCALib']) );
|
|
||||||
$lignes[] = format_content( 'Dirigeants', array('dir1DateNaiss'=>$wsresult['dir1DateNaiss'],'dir1LieuNaiss'=>$wsresult['dir1LieuNaiss'],'dir2DateNaiss'=>$wsresult['dir2DateNaiss'],'dir2LieuNaiss'=>$wsresult['dir2LieuNaiss'],'dir1Titre'=>$wsresult['dir1Titre'],'dir1NomPrenom'=>$wsresult['dir1NomPrenom'],'dir2Titre'=>$wsresult['dir2Titre'],'dir2NomPrenom'=>$wsresult['dir2NomPrenom']) );
|
|
||||||
$lignes[] = format_content( 'Effectif', array('Bilan'=>$wsresult['Bilan'],'Effectif'=>$wsresult['Effectif']) );
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
|
|
||||||
/*
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Localisation géographique & Recherche presse';
|
|
||||||
$lignes = array();
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
*/
|
|
||||||
|
|
||||||
return $page;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function identite_siretsiege($siret)
|
||||||
|
{
|
||||||
|
$lib = 'Numéro identifiant Siret du siège';
|
||||||
|
$data = substr($siret,0,3).' '.substr($siret,3,3).' '.substr($siret,6,3).' <i>'.substr($siret,9,5).'</i>';
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_tvanumero($tvaNumero, $tvaAttribue, $dept)
|
||||||
|
{
|
||||||
|
$lib = 'Numéro de TVA Intracom.';
|
||||||
|
$data = '';
|
||||||
|
if($dept*1==97)
|
||||||
|
{
|
||||||
|
$data.= '<a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31991L0680:FR:HTML" target="_blank">Non attribué dans les D.O.M.</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data.= substr($tvaNumero,0,2).' '.substr($tvaNumero,2,2).' '.substr($tvaNumero,-9);
|
||||||
|
if (!$tvaAttribue)
|
||||||
|
$data.= ' <img src="./img/exclamation.png" title="Non validé. Obligatoire sur factures, déclarations d\'échange de biens et de TVA !">';
|
||||||
|
}
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_isin($isin, $siret)
|
||||||
|
{
|
||||||
|
if ($isin!='')
|
||||||
|
{
|
||||||
|
$lib = 'Code ISIN';
|
||||||
|
$data = '<a href="./?page=bourse&siret='.$siret.'" title="Voir les informations boursiéres">'.$isin.'</a>';
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_capitalisation($bourse, $isin)
|
||||||
|
{
|
||||||
|
if ($etab['Isin']!='' && $bourse['capitalisation']!=0)
|
||||||
|
{
|
||||||
|
$lib = 'Capitalisation';
|
||||||
|
$data = number_format($bourse['capitalisation'],0,'', ' ').' € au '.WDate::dateT('Y-m-d','d/m/Y',$bourse['derCoursDate']);
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_logo()
|
||||||
|
{
|
||||||
|
$lib = 'Logo';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function identite_numrc($numRC)
|
||||||
|
{
|
||||||
|
if (isset($numRC) && $numRC!='')
|
||||||
|
{
|
||||||
|
$lib = 'Numéro R.C.';
|
||||||
|
$data = $numRC;
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_autreid($autreId, $tribunalLib, $numRC)
|
||||||
|
{
|
||||||
|
if (isset($autreId) && $autreId!='' && ( (isset($numRC) && $numRC=='') || substr($autreId,0,1)=='W'))
|
||||||
|
{
|
||||||
|
$libTrib = '';
|
||||||
|
if (substr($autreId,0,1)=='W') $lib = 'Identifiant Association WALDEC';
|
||||||
|
elseif (preg_match('/(A|B|C|D)/i', $autreId))
|
||||||
|
{
|
||||||
|
$lib = 'Numéro R.C.';
|
||||||
|
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
|
||||||
|
}
|
||||||
|
elseif (preg_match('/(P)/i', $etab['AutreId']))
|
||||||
|
{
|
||||||
|
$lib = 'Numéro R.S.A.C.';
|
||||||
|
$libTrib = ' RSAC '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$tribunalLib);
|
||||||
|
}
|
||||||
|
$data = $autreId.$libTrib;
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_actif($siren, $siret, $idEntreprise, $siege, $actif, $dateClotEt)
|
||||||
|
{
|
||||||
|
$lib = 'Etablissement actif';
|
||||||
|
if ($siege==0)
|
||||||
|
$lib.= '<br/><a title="Voir la fiche d\'identité du siège de l\'entreprise" href="/?page=identite&siret='.$siren.'&idEntreprise='.$idEntreprise.'">Accès à la fiche du siège</a>';
|
||||||
|
|
||||||
|
if ($actif==1)
|
||||||
|
$data = 'Oui';
|
||||||
|
else {
|
||||||
|
$data = '<b>NON</b>';
|
||||||
|
$dateCloture=str_replace('-','',$dateClotEt);
|
||||||
|
if ($dateClotEt<>'')
|
||||||
|
$data.= "<i> (Fin d'activité en ".WDate::dateT('Ymd', 'm/Y', $dateCloture).')</i>';
|
||||||
|
}
|
||||||
|
if ($siren*1<>0 && preg_match('/AVISINSEE/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
$data.=' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret='.$siret.'">(Situation au répertoire SIRENE)</a>';
|
||||||
|
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_situationjuridique($situationjuridique, $dateRadiation, $siret, $idEntreprise)
|
||||||
|
{
|
||||||
|
if ( $situationjuridique=='P' || $situationjuridique[0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
||||||
|
{
|
||||||
|
$lib = 'Situation juridique';
|
||||||
|
$dateRad = '';
|
||||||
|
if(isset($dateRadiation) && $dateRadiation!='' && $dateRadiation!='0000-00-00'){
|
||||||
|
$dateRad = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$dateRadiation));
|
||||||
|
}
|
||||||
|
if ($situationjuridique=='P')
|
||||||
|
{
|
||||||
|
$data = '<a href="./?page=annonces&siret='.$siret.'&idEntreprise='.$idEntreprise.'">'.
|
||||||
|
'<font color="red"><b>En procédure collective</b></font>'.
|
||||||
|
'</a>';
|
||||||
|
if($dateRadiation!=''){ $data.= '<br/>Radié du RCS le '.$dateRad; }
|
||||||
|
}
|
||||||
|
|
||||||
|
//Radiation
|
||||||
|
if($situationjuridique=='RR')
|
||||||
|
{
|
||||||
|
$data.= 'Radié du RCS';
|
||||||
|
if($dateRadiation!=''){ $data.= ' le '.$dateRad; }
|
||||||
|
}elseif($situationjuridique=='RP'){
|
||||||
|
$data.= 'Radiation publiée';
|
||||||
|
if($dateRadiation!=''){ $data.= ' le '.$dateRad; }
|
||||||
|
}
|
||||||
|
//Mode Edition
|
||||||
|
if ($_SESSION['tabInfo']['mode_edition']==1)
|
||||||
|
{
|
||||||
|
$data.= '<a href="./?page=saisie&siret='.$siret.'&idEntreprise='.$idEntreprise.'">(Edition)</a>';
|
||||||
|
}
|
||||||
|
return array( $lib , $data );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_raisonsociale($nom, $nom2, $nomlong)
|
||||||
|
{
|
||||||
|
$lib = 'Raison Sociale';
|
||||||
|
|
||||||
|
$title = '';
|
||||||
|
if(isset($nomlong) && $nomlong!='' && $nomlong!=$nom )
|
||||||
|
$title = $nomlong;
|
||||||
|
|
||||||
|
$data = $nom;
|
||||||
|
if ($nom2!='') $data.= '<br/>'.$nom2;
|
||||||
|
|
||||||
|
return array( $lib , $data , $title );
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_enseignesigle($enseigne, $sigle, $siglelong)
|
||||||
|
{
|
||||||
|
$lib = '';
|
||||||
|
if ($enseigne!='' && $sigle!=''){
|
||||||
|
$lib='Enseigne / Sigle';
|
||||||
|
$data=$enseigne.' / '.$sigle;
|
||||||
|
}elseif($enseigne!='' && $sigle=='' && $siglelong!='' ){
|
||||||
|
$lib='Enseigne / Sigle';
|
||||||
|
$data=$enseigne.' / '.$siglelong;
|
||||||
|
}elseif($enseigne!='' && $sigle==''){
|
||||||
|
$lib='Enseigne';
|
||||||
|
$data=$enseigne;
|
||||||
|
}elseif($enseigne=='' && $sigle!=''){
|
||||||
|
$lib='Sigle';
|
||||||
|
$data=$sigle;
|
||||||
|
}elseif($enseigne=='' && $sigle=='' && $siglelong!=''){
|
||||||
|
$lib='Sigle';
|
||||||
|
$data=$siglelong;
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = '';
|
||||||
|
if( isset($siglelong) && $siglelong!='' && $siglelong!=$sigle)
|
||||||
|
$title = $siglelong;
|
||||||
|
|
||||||
|
if($lib!='')
|
||||||
|
{
|
||||||
|
return array($lib, $data, $title);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_fj($fj, $fjLib, $fj2, $fj2Lib)
|
||||||
|
{
|
||||||
|
$lib = 'Forme juridique';
|
||||||
|
|
||||||
|
$data = $fj.' : '.strWsToHtml($fjLib);
|
||||||
|
|
||||||
|
if(isset($fj2) && $fj2!='' && isset($fj2Lib) && $fj2Lib!='')
|
||||||
|
{
|
||||||
|
$data.= '<img src="./img/exclamation.png" title="Forme jurique au RCS : '.$fj2Lib.' ('.$fj2.')"/>';
|
||||||
|
}
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_dateimmat($dateimmat)
|
||||||
|
{
|
||||||
|
$dateImmat = '';
|
||||||
|
if(isset($dateimmat) && $dateimmat!='' && $dateimmat!='0000-00-00'){
|
||||||
|
$dateImmat = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$dateimmat));
|
||||||
|
}
|
||||||
|
if($dateImmat!='')
|
||||||
|
{
|
||||||
|
$lib = 'Date d\'immatriculation';
|
||||||
|
$data = $dateImmat;
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_datecreaen($datecreaen)
|
||||||
|
{
|
||||||
|
$lib = 'Création de l\'entreprise';
|
||||||
|
$dateCreationEn=str_replace('-','',$datecreaen);
|
||||||
|
if (substr($dateCreationEn,-2)*1==0)
|
||||||
|
$data = WDate::dateT('Ymd', 'm/Y', $dateCreationEn);
|
||||||
|
else
|
||||||
|
$data = WDate::dateT('Ymd', 'd/m/Y', $dateCreationEn);
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_datecreaet($datecreaet)
|
||||||
|
{
|
||||||
|
$lib = 'Création de l\'établissement';
|
||||||
|
$dateCreationEt=str_replace('-','',$datecreaet);
|
||||||
|
if ($dateCreationEt*1<>0) {
|
||||||
|
if (substr($dateCreationEt,-2)*1==0)
|
||||||
|
$data = WDate::dateT('Ymd', 'm/Y', $dateCreationEt);
|
||||||
|
else
|
||||||
|
$data = WDate::dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
||||||
|
} else $data = 'N/C';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_adresse($adresse, $adresse2, $num, $rue, $cp, $ville, $pays)
|
||||||
|
{
|
||||||
|
$lib = 'Adresse';
|
||||||
|
|
||||||
|
if($rue==''){ $voie = $adresse2; }else{ $voie = $rue; }
|
||||||
|
|
||||||
|
$data = '<a href="/?page=recherche&vue=list&formR[type]=ent&formR[numVoie]='.urlencode($num).'&formR[voie]='.urlencode($voie).'&formR[cpVille]='.urlencode($cp).'" title="Rechercher à partir de cette adresse">';
|
||||||
|
$data.= '<p class="adresse">'.$adresse.'</p>';
|
||||||
|
|
||||||
|
if (preg_match('/CHEZ SOFRADOM/i',$adresse2))
|
||||||
|
$etab['Adresse2']='<a title="Voir la fiche d\'identité du domiciliataire de cette entreprise" href="/?page=identite&siret=42495045900018&idEntreprise=6720043">CHEZ SOFRADOM</a>';
|
||||||
|
//http://extranet.devlocal.com/?page=identite&siret=42495045900018&idEntreprise=6720043
|
||||||
|
if ($adresse2<>'')
|
||||||
|
$data.= '<p class="adresse">'.$adresse2.'</p>';
|
||||||
|
|
||||||
|
$cp=$cp*1;
|
||||||
|
if ($cp!=0)
|
||||||
|
$data.= '<p class="adresse">'.$cp.' '.strWsToHtml($ville).'</p>';
|
||||||
|
if ($pays!='' && strtoupper(substr($pays,0,3))!='FRA')
|
||||||
|
$data.= '<p class="adresse">'.strWsToHtml($pays).'</p>';
|
||||||
|
|
||||||
|
$data.= '</a>';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_zones($geoinfos)
|
||||||
|
{
|
||||||
|
if (@$geoinfos['ZUS']=='OUI' || @$geoinfos['ZFU']=='OUI' || @$geoinfos['ZRU']=='OUI' || @$geoinfos['CUCS']=='OUI' || @$geoinfos['ZRR']=='OUI' || @$geoinfos['AFR']=='OUI')
|
||||||
|
{
|
||||||
|
$lib = 'Zones prioritaires';
|
||||||
|
$data = '';
|
||||||
|
if ($geoinfos['ZUS']=='OUI') $data.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$geoinfos['NZUS'].'" target="_blank">ZUS n°'.$geoinfos['NZUS'].'</a><br/>';
|
||||||
|
if ($geoinfos['ZFU']=='OUI') $data.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$geoinfos['NZFU'].'" target="_blank">ZFU n°'.$geoinfos['NZFU'].'</a><br/>';
|
||||||
|
if ($geoinfos['ZRU']=='OUI') $data.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$geoinfos['NZRU'].'" target="_blank">ZRU n°'.$geoinfos['NZRU'].'</a><br/>';
|
||||||
|
if ($geoinfos['ZRR']=='OUI') $data.= '<a href="http://www.diact.gouv.fr/IMG/Fichiers/Rural%20/ZRR/carte_zrr_20090409.pdf" target="_blank">ZRR n°'.$geoinfos['NZRR'].'</a><br/>';
|
||||||
|
if ($geoinfos['AFR']=='OUI') $data.= '<a href="http://www.diact.gouv.fr/IMG/Fichiers/AFR/com_fr_AFR0907.pdf" target="_blank">AFR n°'.$geoinfos['NAFR'].'</a><br/>';
|
||||||
|
if ($geoinfos['CUCS']=='OUI') $data.= '<a href="http://sig.ville.gouv.fr/Territoire/'.$geoinfos['NCUCS'].'" target="_blank">CUCS n°'.$geoinfos['NCUCS'];
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_tel($tel, $enseigne, $nom, $adresse, $cp, $ville)
|
||||||
|
{
|
||||||
|
$lib = 'Téléphone';
|
||||||
|
|
||||||
|
$data = '';
|
||||||
|
|
||||||
|
$data.= '<div class="txtAdresse">';
|
||||||
|
$data.= '<p>';
|
||||||
|
|
||||||
|
if (trim($tel)=='') $data.= 'N/C';
|
||||||
|
else $data.= $tel;
|
||||||
|
|
||||||
|
if ($enseigne!='') $libNom = urlencode($enseigne);
|
||||||
|
else $libNom = urlencode($nom);
|
||||||
|
|
||||||
|
$i_adr=0;
|
||||||
|
while (substr($adresse,0,1)=='0')
|
||||||
|
{
|
||||||
|
$i_adr++;
|
||||||
|
$adresse = substr($adresse,1,strlen($adresse)-1);
|
||||||
|
if ($i_adr>4) break;
|
||||||
|
}
|
||||||
|
$data.= ' <a title="Rechercher le numéro de téléphone dans l\'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom='.$libNom.'&adr='.urlencode(utf8_decode($adresse)).'&loc='.urlencode(utf8_decode($cp.' '.$ville)).'&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a></p>';
|
||||||
|
$data.= '</div>';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_fax($fax)
|
||||||
|
{
|
||||||
|
if($fax*1>0){
|
||||||
|
$lib = 'Fax';
|
||||||
|
$data = $fax;
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_web($web)
|
||||||
|
{
|
||||||
|
if ($web!='')
|
||||||
|
{
|
||||||
|
if (substr($web,0,7)!='http://') $siteWeb = 'http://'.$web;
|
||||||
|
else $siteWeb = $web;
|
||||||
|
|
||||||
|
$lib = 'Site Internet';
|
||||||
|
$data = '<a href="'.$siteWeb.'" target="_blank">'.$siteWeb.'</a>';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_mail($email)
|
||||||
|
{
|
||||||
|
if (trim($email)!='')
|
||||||
|
{
|
||||||
|
$lib = 'Courriel';
|
||||||
|
$data = '<a href="mailto:'.$email.'" target="_blank">'.$email.'</a>';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_activiteen($activite, $nafent, $nafentlib)
|
||||||
|
{
|
||||||
|
$lib = 'Activité de l\'entreprise';
|
||||||
|
|
||||||
|
if ($activite!='' && !preg_match('/non pr(e|é)cis(e|é)/i',utf8_decode($activite))) {
|
||||||
|
$texte = preg_replace_callback("/((?:[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, strWsToHtml($activite));
|
||||||
|
$data = $texte.' ('.$nafent.' : '. strWsToHtml($nafentlib).')';
|
||||||
|
} else
|
||||||
|
$data = $nafent.' : '. strWsToHtml($nafentlib);
|
||||||
|
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_activiteet($nafetab, $nafetablib)
|
||||||
|
{
|
||||||
|
$lib = 'Activité de l\'établissement';
|
||||||
|
$data = $nafetab.' : '. strWsToHtml($nafetablib);
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_naf4($naf4ent, $naf4entlib, $naf4etab, $naf4etablib)
|
||||||
|
{
|
||||||
|
if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim(@$naf4ent)!='')
|
||||||
|
{
|
||||||
|
$lib = 'Anciens codes NAF';
|
||||||
|
$data = $naf4ent.' - '.strWsToHtml($naf4entlib).'<br/><b>Étab. :</b> '.$naf4etab.' - '. strWsToHtml($naf4etablib);
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_natureactivite($natureactivite, $actif)
|
||||||
|
{
|
||||||
|
if ($natureactivite==1 && $actif==1)
|
||||||
|
{
|
||||||
|
$lib = 'Nature de l\'activité';
|
||||||
|
$data = 'Saisonnière';
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_originefond($originecreation)
|
||||||
|
{
|
||||||
|
if ( ( $originecreation*1>0 && $originecreation*1<9 ) ||
|
||||||
|
$originecreation=='A' || $originecreation=='B' || $originecreation=='C' ||
|
||||||
|
$originecreation=='D' || $originecreation=='E' )
|
||||||
|
{
|
||||||
|
$tabCreation=array(
|
||||||
|
'a1'=>'Création',
|
||||||
|
'a3'=>'Achat',
|
||||||
|
'a4'=>'Apport',
|
||||||
|
'a6'=>'Prise en location gérance',
|
||||||
|
'a7'=>'Partage',
|
||||||
|
'a8'=>'Reprise',
|
||||||
|
'aA'=>'Reprise globale de l\'exploitation agricole',
|
||||||
|
'aB'=>'Poursuite de l\'exploitation agricole par le conjoint',
|
||||||
|
'aC'=>'Transfert de propriété de l\'exploitation agricole',
|
||||||
|
'aD'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)',
|
||||||
|
'aE'=>'Reprise d\'exploitation agricole individuelle',
|
||||||
|
);
|
||||||
|
|
||||||
|
$lib = 'Origine du fonds';
|
||||||
|
$data = $tabCreation['a'.$originecreation];
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_typeexploitation($type)
|
||||||
|
{
|
||||||
|
if ( isset($type) && $type!=0 )
|
||||||
|
{
|
||||||
|
$tabTypeExploitation = array(
|
||||||
|
1 => "Locataire du fond de commerce",
|
||||||
|
2 => "Loueur du fond de commerce",
|
||||||
|
3 => "Prestation de personnel",
|
||||||
|
10 => "Exploitation directe"
|
||||||
|
);
|
||||||
|
|
||||||
|
$lib = 'Type d\'exploitation';
|
||||||
|
$data = $tabTypeExploitation[$type];
|
||||||
|
return array($lib, $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_nbetabactif($nbetab, $siret, $idEntreprise)
|
||||||
|
{
|
||||||
|
if ($nbetab!='N/C')
|
||||||
|
{
|
||||||
|
$lib = 'Nombre d\'établissements actifs';
|
||||||
|
|
||||||
|
$data = '<a title="Voir la liste des établissements" href="/?page=etablissements&siret='.$siret.'&idEntreprise='.$idEntreprise.'">'.number_format($nbetab*1,null,null,' ').'</a>';
|
||||||
|
if ($nbetab*1>1)
|
||||||
|
{
|
||||||
|
$data.= ' <a title="Voir la liste des établissements" href="/?page=etablissements&siret='.$siret.'&idEntreprise='.$idEntreprise.'">(Liste)</a>';
|
||||||
|
|
||||||
|
}
|
||||||
|
return array($lib, $data);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_capital($capital, $capitaldev, $capitallib, $capitaltype, $bilan)
|
||||||
|
{
|
||||||
|
if (isset($capital) && $capital*1>0)
|
||||||
|
{
|
||||||
|
$title = '';
|
||||||
|
if(isset($bilan['Capital'])) $title.='Capital de '.moneyKM($bilan['Capital']).deviseText($bilan['Devise']);
|
||||||
|
if(isset($bilan['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
|
||||||
|
|
||||||
|
$lib = 'Capital';
|
||||||
|
if (isset($capitaltype) && $capitaltype=='V'){print 'variable';}
|
||||||
|
|
||||||
|
$data = number_format($capital,0,',',' ').' ';
|
||||||
|
|
||||||
|
if ($capitaldev='EUR') $data.= '€';
|
||||||
|
else $data.= $capitaldev.' ('.strWsToHtml($capitallib).')';
|
||||||
|
|
||||||
|
return array($lib, $data, $title);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_ca($bilan, $trancheCALib)
|
||||||
|
{
|
||||||
|
$lib = 'Chiffre d\'affaire';
|
||||||
|
$title = '';
|
||||||
|
if(isset($bilan['CA']) && !empty($bilan['CA']) ) $title.='Chiffre d\'affaire de '.moneyKM($bilan['CA']).deviseText($bilan['Devise']);
|
||||||
|
if(isset($bilan['Resultat']) && !empty($bilan['Resultat']) ) $title.=' et Résultat de '.moneyKM($bilan['Resultat']).deviseText($bilan['Devise']);
|
||||||
|
if(isset($bilan['Cloture']) && !empty($bilan['Cloture']) ) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
|
||||||
|
|
||||||
|
if(isset($bilan['CA']) && !empty($bilan['CA']) && ( !isset($trancheCALib) || $trancheCALib=='N/C'))
|
||||||
|
{
|
||||||
|
$data = moneyKM($bilan['CA']).deviseText($bilan['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
|
||||||
|
}elseif( !empty($trancheCALib) && $trancheCALib!='N/C'){
|
||||||
|
$data = strWsToHtml($trancheCALib);
|
||||||
|
}else{
|
||||||
|
$data = 'N/C';
|
||||||
|
}
|
||||||
|
return array($lib, $data, $title);
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_dirigeants($Dir1Titre, $Dir1NomPrenom, $Dir1DateNaiss, $Dir1LieuNaiss, $Dir2Titre, $Dir2NomPrenom, $Dir2DateNaiss, $Dir2LieuNaiss)
|
||||||
|
{
|
||||||
|
$lib = 'Principaux Dirigeants';
|
||||||
|
|
||||||
|
$dir1DateNaiss = '';
|
||||||
|
if(isset($Dir1DateNaiss) && $Dir1DateNaiss!='' && $Dir1DateNaiss!='0000-00-00')
|
||||||
|
{
|
||||||
|
$dir1DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Dir1DateNaiss));
|
||||||
|
}
|
||||||
|
$dir1LieuNaiss = '';
|
||||||
|
if(isset($Dir1LieuNaiss) && $Dir1LieuNaiss!='')
|
||||||
|
{
|
||||||
|
$dir1LieuNaiss = $Dir1LieuNaiss;
|
||||||
|
}
|
||||||
|
$dir2DateNaiss = '';
|
||||||
|
if(isset($Dir2DateNaiss) && $Dir2DateNaiss!='' && $Dir2DateNaiss!='0000-00-00')
|
||||||
|
{
|
||||||
|
$dir2DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$Dir2DateNaiss));
|
||||||
|
}
|
||||||
|
$dir2LieuNaiss = '';
|
||||||
|
if(isset($Dir2LieuNaiss) && $Dir2LieuNaiss!='')
|
||||||
|
{
|
||||||
|
$dir2LieuNaiss = $Dir2LieuNaiss;
|
||||||
|
}
|
||||||
|
$dir1NaissText = '';
|
||||||
|
if($dir1DateNaiss!='') $dir1NaissText.= 'né(e) le '.$dir1DateNaiss;
|
||||||
|
if($dir1LieuNaiss!='' && $dir1NaissText!='') $dir1NaissText.= ' à '.$dir1LieuNaiss;
|
||||||
|
elseif($dir1LieuNaiss!='' && $dir1NaissText=='') $dir1NaissText.= 'né(e) à '.$dir1LieuNaiss;
|
||||||
|
|
||||||
|
$dir2NaissText = '';
|
||||||
|
if($dir2DateNaiss!='') $dir2NaissText.= 'né(e) le '.$dir2DateNaiss;
|
||||||
|
if($dir2LieuNaiss!='' && $dir2NaissText!='') $dir2NaissText.= ' à '.$dir2LieuNaiss;
|
||||||
|
elseif($dir2LieuNaiss!='' && $dir2NaissText=='') $dir2NaissText.= 'né(e) à '.$dir2LieuNaiss;
|
||||||
|
|
||||||
|
$dir_actif = false;
|
||||||
|
if ($Dir1Titre!='')
|
||||||
|
{
|
||||||
|
$data = '<div class="txtAdresse">';
|
||||||
|
$data.= '<p><u><b>'.strWsToHtml(ucfirst($Dir1Titre)).'</b></u><br/>'.strWsToHtml($Dir1NomPrenom);
|
||||||
|
if($dir1NaissText!=''){ $data.=', '.$dir1NaissText; }
|
||||||
|
$data.= '</p></div>';
|
||||||
|
$dir_actif = $dir_actif || true;
|
||||||
|
}
|
||||||
|
if ($Dir2Titre!='')
|
||||||
|
{
|
||||||
|
$data.= '<br/>';
|
||||||
|
$data.= '<div class="txtAdresse">';
|
||||||
|
$data.= '<p><u><b>'.strWsToHtml(ucfirst($Dir2Titre)).'</b>:</u><br/>'.strWsToHtml($Dir2NomPrenom);
|
||||||
|
if($dir2NaissText!=''){ $data.=', '.$dir2NaissText; }
|
||||||
|
$data.= '</p></div>';
|
||||||
|
$dir_actif = $dir_actif || true;
|
||||||
|
}
|
||||||
|
if($dir_actif)
|
||||||
|
{
|
||||||
|
return array($lib, $data);
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_effectif($effectif, $bilan)
|
||||||
|
{
|
||||||
|
$lib = 'Effectif de l\'entreprise';
|
||||||
|
|
||||||
|
$title = '';
|
||||||
|
if( isset($bilan['Effectif']) && !empty($bilan['Effectif']) ) $title.=$bilan['Effectif'].' salarié(s)';
|
||||||
|
if( isset($bilan['Cloture']) && !empty($bilan['Cloture']) ) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$bilan['Cloture']));
|
||||||
|
|
||||||
|
if( (!isset($effectif) || empty($effectif) || $effecif=='N/C' || $effectif==0) && isset($bilan['Effectif']))
|
||||||
|
{
|
||||||
|
$data = $title;
|
||||||
|
}elseif(isset($effectif) && $effectif!='N/C' && $effectif!=0 ){
|
||||||
|
$data = number_format($effectif*1,null,null,' ').' salarié(s)';
|
||||||
|
}else{
|
||||||
|
$data = 'N/C';
|
||||||
|
}
|
||||||
|
return array($lib, $data, $title);
|
||||||
|
}
|
||||||
|
|
||||||
|
function normaliseVoie($voie) {
|
||||||
|
switch (strtoupper($voie)) {
|
||||||
|
case 'BD': case 'BVD': return 'BOULEVARD'; break;
|
||||||
|
case 'AV': case 'AVE': return 'AVENUE'; break;
|
||||||
|
case 'PL': case 'PLA': return 'PLACE'; break;
|
||||||
|
case 'ESP': return 'ESPLANADE'; break;
|
||||||
|
//- 8E__ARRONDISSEMENT
|
||||||
|
default; return strtoupper($voie); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_infogeo($geoPrecis, $geoLat, $geoLong, $ville, $num, $voie, $rue, $cp)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function identite_commune()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,166 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function formatPct($pct) {
|
|
||||||
$pct=round($pct/10,0)*10;
|
|
||||||
if ($pct==0) $pct=10;
|
|
||||||
return $pct;
|
|
||||||
}
|
|
||||||
|
|
||||||
function block_indiscore($wsresult)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
|
|
||||||
$etab = $wsresult;
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'INDISCORE©';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
|
|
||||||
$i=0;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Évaluation';
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ' );
|
|
||||||
$lignes[] = array( 'width'=>'550', 'content'=>info_evaluation( array('AnalyseConfor'=>$etab['AnalyseConfor'], 'ScoreConfor'=>$etab['ScoreConfor'], 'AnalyseDirigeance'=>$etab['AnalyseDirigeance'], 'ScoreDirigeance'=>$etab['ScoreDirigeance'], 'AnalyseSolvabilite'=>$etab['AnalyseSolvabilite'], 'Indiscore'=>$etab['Indiscore']) ) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$millesimeMax=date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));
|
|
||||||
if ($etab['NbBilansScore']>0 && $etab['Bilans'][0]['Millesime']>=$millesimeMax)
|
|
||||||
{
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ' );
|
|
||||||
$lignes[] = array( 'width'=>'550', 'content'=>info_evaluationtxt( array('NbBilansScore'=>$etab['NbBilansScore'], 'Bilans'=>$etab['Bilans'], 'tabInfosNotations'=>$etab['tabInfosNotations']) ) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ' );
|
|
||||||
$lignes[] = array( 'width'=>'550', 'content'=>info_evaluationautre( array('scores'=>$etab['scores']) ) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ' );
|
|
||||||
$lignes[] = array( 'width'=>'550', 'content'=>info_evaluationtxt( array('NbBilansScore'=>$etab['NbBilansScore'], 'Bilans'=>$etab['Bilans'], 'tabInfosNotations'=>$etab['tabInfosNotations']) ) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
}
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['titre'] = 'Conclusion';
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ' );
|
|
||||||
$lignes[] = array( 'width'=>'550', 'content'=>info_evaluationconclusion( array('Indiscore'=>$etab['Indiscore'],'infoEncours'=>$etab['infoEncours'],'encours'=>$etab['encours']) ) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'colspan'=>'2', 'content'=>'<img src="./img/logo_indiscore.png"/>' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
return $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_evaluation($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$html = '';
|
|
||||||
$html.= 'L\'évaluation indiScore© c\'est en partie basée sur les points notables suivantes :<br/>'."\n";
|
|
||||||
|
|
||||||
$html.= '<h3><u>Conformité légale :</u></h3>'."\n";
|
|
||||||
$html.= '<div class="stats gradiant_pic">'."\n";
|
|
||||||
$html.= '<ul>'."\n";
|
|
||||||
$html.= ' <li>'."\n";
|
|
||||||
$html.= ' <i>'.$AnalyseConfor.'</i>'."\n";
|
|
||||||
$html.= ' <div class="blocdegrade clearfix">'."\n";
|
|
||||||
$html.= ' <span class="textdegrade">Conformité</span>'."\n";
|
|
||||||
$html.= ' <div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-'.formatPct($ScoreConfor).'.png"/></div>'."\n";
|
|
||||||
$html.= ' <div class="regle"><img src="./img/sgradiant2.png" /></div>'."\n";
|
|
||||||
$html.= ' </div>'."\n";
|
|
||||||
$html.= ' </li>'."\n";
|
|
||||||
$html.= '</ul>'."\n";
|
|
||||||
$html.= '</div>'."\n";
|
|
||||||
|
|
||||||
$html.= '<h3><u>Dirigeance :</u></h3>'."\n";
|
|
||||||
$html.= '<div class="stats gradiant_pic">'."\n";
|
|
||||||
$html.= '<ul>'."\n";
|
|
||||||
$html.= ' <li>'."\n";
|
|
||||||
$html.= ' <i>'.$AnalyseDirigeance.'</i>'."\n";
|
|
||||||
$html.= ' <div class="blocdegrade clearfix">'."\n";
|
|
||||||
$html.= ' <span class="textdegrade">Dirigeance</span>'."\n";
|
|
||||||
$html.= ' <div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-'.formatPct($ScoreDirigeance).'.png"/></div>'."\n";
|
|
||||||
$html.= ' <div class="regle"><img src="./img/sgradiant2.png" /></div>'."\n";
|
|
||||||
$html.= ' </div>'."\n";
|
|
||||||
$html.= ' </li>'."\n";
|
|
||||||
$html.= '</ul>'."\n";
|
|
||||||
$html.= '</div>'."\n";
|
|
||||||
|
|
||||||
|
|
||||||
$html.= '<h3><u>Solvabilité :</u></h3>'."\n";
|
|
||||||
$html.= '<div class="stats gradiant_pic">'."\n";
|
|
||||||
$html.= '<ul>'."\n";
|
|
||||||
$html.= ' <li>'."\n";
|
|
||||||
$html.= ' <i>L\'analyse de la solvabilité est '.$AnalyseSolvabilite.'</i>'."\n";
|
|
||||||
$html.= ' <div class="blocdegrade clearfix">'."\n";
|
|
||||||
$html.= ' <span class="textdegrade">Solvabilité</span>'."\n";
|
|
||||||
$html.= ' <div class="imgdegrade"><img class="borderimg" src="./img/indiscore/imgscores-'.formatPct($Indiscore).'.png"/></div>'."\n";
|
|
||||||
$html.= ' <div class="regle"><img src="./img/sgradiant2.png" /></div>'."\n";
|
|
||||||
$html.= ' </div>'."\n";
|
|
||||||
$html.= ' </li>'."\n";
|
|
||||||
$html.= '</ul>'."\n";
|
|
||||||
$html.= '</div>'."\n";
|
|
||||||
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_evaluationtxt($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$millesimeMax = date('Ymd', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));
|
|
||||||
$html = '';
|
|
||||||
if ( $NbBilansScore>0 && $Bilans[0]['Millesime'] >= $millesimeMax )
|
|
||||||
{
|
|
||||||
$html.='A la lecture du dernier bilan, la situation financière de l\'entreprise '.$Nom.' est <b>'.$tabInfosNotations['SituationFinanciere'].'</b>.<br/>'."\n";
|
|
||||||
|
|
||||||
if (html_entity_decode($tabInfosNotations['ProbabiliteDefaut'])<>'En défaut')
|
|
||||||
$html.= 'La probabilité de défaillance associée à cette note avoisine les '.number_format($tabInfosNotations['ProbabiliteDefaut'],3,',',' ') .' %'."\n";
|
|
||||||
else
|
|
||||||
$html.= 'Cette entreprise est défaillante ou sur le point de le devenir.'."\n";
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$html.='La situation financière de l\'entreprise ne peut être évaluée en détail car';
|
|
||||||
if ($Bilans[0]['Millesime']<$millesimeMax && count($Bilans)>0 ) {
|
|
||||||
$html.= 'le dernier bilan disponible date de '.substr($Bilans[0]['Millesime'],0,4).'.'."\n";
|
|
||||||
} else {
|
|
||||||
$html.= 'aucun bilan n\'est disponible.'."\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function info_evaluationautre($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$html = '<i>Pour information, les méthodes standards donnent : Conan & Holder = <b>'.$scores['ConanH'].'</b>, Afdcc2 = <b>'.$scores['Afdcc2'].'</b> et Score Z = <b>'.$scores['Z'].'</b>.</i>'."\n";
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function info_evaluationconclusion($info)
|
|
||||||
{
|
|
||||||
if(count($info)>0) foreach($info as $key => $v) { ${$key} = $v; }
|
|
||||||
$html.= 'Compte tenu des informations disponibles auprès des sources officielles Scores et Décisions présente la conclusion suivante :<br/>'."\n";
|
|
||||||
$html.= '<h3>LE SCORE EST DE '.$Indiscore.' SUR 100 POINTS</h3>'."\n";
|
|
||||||
|
|
||||||
if($infoEncours!='' && !is_numeric($encours) && $encours=='N/A'){
|
|
||||||
$html.='<h3>'.$infoEncours.'</h3>';
|
|
||||||
}else{
|
|
||||||
if ($Indiscore!=0) {
|
|
||||||
$html.= '<i>La tendance de la note est '.$etab['TendanceIndiscore'].'</i>'."\n";
|
|
||||||
$html.= '<h3>L\'ENCOURS MAXIMUM CONSEILLÉ EST DE '.round($encours/1000).' K€</h3>'."\n";
|
|
||||||
}
|
|
||||||
$html.= '<h3>'.$infoEncours.'</h3>'."\n";
|
|
||||||
}
|
|
||||||
return $html;
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function block_ratios($wsresult)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
|
|
||||||
isset($_REQUEST['bilan']) ? $bilan=$_REQUEST['bilan'] : $bilan=0 ;
|
|
||||||
isset($_REQUEST['ratio']) ? $ratio=$_REQUEST['ratio'] : $ratio=0 ;
|
|
||||||
|
|
||||||
$bilansInfos = $wsresult['bilansInfos'];
|
|
||||||
$ratiosEntrep = $wsresult['ratiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $wsresult['ratiosEntrepEvol'];
|
|
||||||
$ratiosInfos = $wsresult['ratiosInfos'];
|
|
||||||
$ratiosSecteur = $wsresult['ratiosSecteur'];
|
|
||||||
|
|
||||||
$tabRatio = array(
|
|
||||||
0 => array('titre'=>'EQUILIBRE FINANCIER'),
|
|
||||||
|
|
||||||
1 => array('titre'=>'MARGE BRUTE D\'AUTOFINANCEMENT', 'stitre'=>'(MBA ou CAF)', 'ratio'=>'r233', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
2 => array('titre'=>'COUVERTURE du BFR ', 'stitre'=>'(FR/BFR)', 'ratio'=>'r234', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
3 => array('titre'=>'COUVERTURE des IMMOS NETTES ', 'stitre'=>'(Capitaux permanents / Immobilisations nettes)', 'ratio'=>'r237', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
4 => array('titre'=>'COUVERTURE du CA ', 'stitre'=>'(Fond de roulement net global sur 12m x 360 / Chiffre d\'affaire)', 'ratio'=>'r238', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
5 => array('titre'=>'SOLVABILITE ', 'stitre'=>'(Capitaux propres / Ensemble des dettes)', 'ratio'=>'r239', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
6 => array('titre'=>'INDEPENDANCE FINANCIERE ', 'stitre'=>'(Cap.propres/Capitaux permanents)', 'ratio'=>'r240', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
|
|
||||||
7 => array('titre'=>'PROFITABILITE'),
|
|
||||||
|
|
||||||
8 => array('titre'=>'RENTABILITE ECONOMIQUE ', 'stitre'=>'(EBE/TOTAL bilan)', 'ratio'=>'r262', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
9 => array('titre'=>'RENTABILITE FINANCIERE ', 'stitre'=>'(Résult.Net/Cap.propres)', 'ratio'=>'r263', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
10 => array('titre'=>'RENTABILITE COMMERCIALE ', 'stitre'=>'(Résultat net/CA)', 'ratio'=>'r264', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
11 => array('titre'=>'CONTRIBUTION DU CAPITAL', 'stitre'=>'(Capacité d\'autofinancement sur 12 mois / Capitaux permanents)', 'ratio'=>'r265', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
12 => array('titre'=>'CONTRIBUTION DE LA VA', 'stitre'=>'(Capacité d\'autofinancement / Valeur ajoutée)', 'ratio'=>'r266', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
|
|
||||||
13 => array('titre'=>'LIQUIDITE'),
|
|
||||||
|
|
||||||
14 => array('titre'=>'LIQUIDITE IMMEDIATE', 'stitre'=>'(Disponibilité / Dettes CT)', 'ratio'=>'r250', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
15 => array('titre'=>'LIQUIDITE GENERALE', 'stitre'=>'(Act.circulant net/Dettes CT)', 'ratio'=>'r251', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
16 => array('titre'=>'LIQUIDITE REDUITE', 'stitre'=>'(Disponibilité et créances réelles /Dettes CT)', 'ratio'=>'r252', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
|
|
||||||
17 => array('titre'=>'ENDETTEMENT'),
|
|
||||||
|
|
||||||
18 => array('titre'=>'ENDETTEMENT ', 'stitre'=>'(Dettes a + 1 an / Capitaux propres)', 'ratio'=>'r244', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
19 => array('titre'=>'CAPACITE DE REMBOURSEMENT', 'stitre'=>'(Dettes.bancaires.(+MT+LT+C.bail)/CAF)', 'ratio'=>'r247', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
20 => array('titre'=>'FINANCEMENT DES STOCKS', 'stitre'=>'(Dettes aux fournisseurs / Stock)', 'ratio'=>'r248', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
|
|
||||||
21 => array('titre'=>'PRODUCTIVITE'),
|
|
||||||
|
|
||||||
22 => array('titre'=>'PRODUCTIVITE DE L\'ACTIF', 'stitre'=>'(Chiffre d\'affaire / Actif comptable)', 'ratio'=>'r271', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
23 => array('titre'=>'DUREE CLIENT', 'stitre'=>'(Rotation clients en VJ TTC)', 'ratio'=>'r278', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
24 => array('titre'=>'DUREE FOURNISSEUR', 'stitre'=>'(Rotation fournisseurs en JA TTC)', 'ratio'=>'r279', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
25 => array('titre'=>'POIDS MASSE SALARIALE', 'stitre'=>'(Ch personnel / VA)', 'ratio'=>'r281', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
26 => array('titre'=>'RENDEMENT', 'stitre'=>'(Production sur 12mois / Effectif)', 'ratio'=>'r261', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
27 => array('titre'=>'PRODUCTIVITE', 'stitre'=>'(CA / Effectif)', 'ratio'=>'r267', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
);
|
|
||||||
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'RATIOS';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
|
|
||||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
$page['blocks'][$i]['titre'] = '';
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'content'=>'<b>Aucun bilan disponible pour cette entreprise !</b>' );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
}else{
|
|
||||||
$i=0;
|
|
||||||
$page['blocks'][$i]['table'] = array();
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ');
|
|
||||||
$lignes[] = array( 'width'=>'200', 'class'=>'StyleInfoLib', 'content'=>'Secteur d\'activité :' );
|
|
||||||
$lignes[] = array( 'width'=>'340', 'class'=>'StyleInfoData','content'=>$_SESSION['tabInfo']['entrep']['nafEn'].' - '.$_SESSION['tabInfo']['entrep']['nafEnLib'] );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ');
|
|
||||||
$lignes[] = array( 'width'=>'200', 'class'=>'StyleInfoLib', 'content'=>'Millésime' );
|
|
||||||
$lignes[] = array( 'width'=>'340', 'class'=>'StyleInfoData','content'=>info_ratiosmillesime(array('bilansInfos'=>$bilansInfos, 'bilan'=>0)) );
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$lignes = array();
|
|
||||||
$lignes[] = array( 'width'=>'30', 'content'=>' ');
|
|
||||||
$lignes[] = array( 'width'=>'200', 'class'=>'StyleInfoLib', 'content'=>'Durée du bilan' );
|
|
||||||
if(isset($bilansInfos[0]['dateCloture'])) {
|
|
||||||
$lignes[] = array( 'width'=>'340', 'class'=>'StyleInfoData','content'=>$bilansInfos[0]['duree'].' mois');
|
|
||||||
}else{
|
|
||||||
$lignes[] = array( 'width'=>'340', 'class'=>'StyleInfoData','content'=>'-');
|
|
||||||
}
|
|
||||||
$page['blocks'][$i]['table']['row'][] = array( 'content'=>$lignes );
|
|
||||||
|
|
||||||
$i++;
|
|
||||||
$page['blocks'][$i]['div'] = array();
|
|
||||||
$page['blocks'][$i]['div']['content'] = '<table id="ratios">'.ratios_tablerow($ratiosInfos, $tabRatio, $bilan, $ratio).'</table>';
|
|
||||||
|
|
||||||
}
|
|
||||||
return $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function theme_div($content)
|
|
||||||
{
|
|
||||||
return $content;
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'cache/cache.php';
|
require_once 'cache/cache.php';
|
||||||
|
require_once realpath(dirname(__FILE__)).'/functions.php';
|
||||||
|
|
||||||
function scoresws_identite($siret, $siren, $idEntreprise)
|
function scoresws_identite($siret, $siren, $idEntreprise)
|
||||||
{
|
{
|
||||||
@ -35,8 +36,9 @@ function scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan)
|
|||||||
|
|
||||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
//Générer un nom de fichier pour le cache et l'export des fichiers
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'annonces-'.$idEntreprise;
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'annonces-'.$idEntreprise;
|
||||||
}else{ $fileName = 'annonces-'.$siret; }
|
}else{ $fileName = 'annonces-'.$siren; }
|
||||||
if($vue!=''){$fileName.= '-'.$idan;}
|
if($vue!=''){$fileName.= '-'.$idan;}
|
||||||
|
|
||||||
cache_filename($fileName);
|
cache_filename($fileName);
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
||||||
$annonces = cache_get('annonces');
|
$annonces = cache_get('annonces');
|
||||||
@ -65,163 +67,14 @@ function scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan)
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function scoresws_synthese($siret, $siren, $idEntreprise)
|
|
||||||
{
|
|
||||||
global $client, $firephp, $fileName;
|
|
||||||
|
|
||||||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'synthese-'.$idEntreprise;
|
|
||||||
}else{ $fileName = 'synthese-'.$siret; }
|
|
||||||
if($ratio!=''){$fileName.='-'.$ratio;}
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
$ratiosEntrep = array();
|
|
||||||
$ratiosInfos = array();
|
|
||||||
$bilansInfos = array();
|
|
||||||
$ratiosEntrepEvol = array();
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$ratiosEntrep = cache_get('ratiosEntrep');
|
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
|
||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
|
||||||
$return = array('bilansInfos'=>$bilansInfos, 'ratiosInfos'=>$ratiosInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol);
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
$O = $client->getRatios($siren, 'synthese');
|
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('ratiosEntrep',$ratiosEntrep);
|
|
||||||
cache_add('bilansInfos',$bilansInfos);
|
|
||||||
cache_add('ratiosInfos',$ratiosInfos);
|
|
||||||
cache_add('ratiosEntrepEvol',$ratiosEntrepEvol);
|
|
||||||
$return = array('bilansInfos'=>$bilansInfos, 'ratiosInfos'=>$ratiosInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol);
|
|
||||||
}catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
$return = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function scoresws_bilans($siret, $siren, $idEntreprise)
|
|
||||||
{
|
|
||||||
global $client, $ratiosEntrep, $firephp, $fileName;
|
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'bilans-'.$idEntreprise;
|
|
||||||
}else{ $fileName = 'bilans-'.$siret; }
|
|
||||||
cache_filename($fileName);
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
|
||||||
{
|
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
|
||||||
$ratiosEntrep = cache_get('ratiosEntrep');
|
|
||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
|
||||||
$dataActif = cache_get('dataActif');
|
|
||||||
$dataPassif = cache_get('dataPassif');
|
|
||||||
$dataSIG = cache_get('dataSIG');
|
|
||||||
|
|
||||||
$return = array('bilansInfos'=> $bilansInfos, 'ratiosInfo'=>$ratiosInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol,'dataActif'=>$dataActif, 'dataPassif'=>$dataPassif, 'dataSIG'=>$dataSIG);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$O = $client->getRatios($siren, 'bilan');
|
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
|
||||||
|
|
||||||
//Affichage des dates dans l'ordre décroissant
|
|
||||||
//Tri des tableaux
|
|
||||||
foreach ($bilansInfos as $key => $row) {
|
|
||||||
$bilansInfos[$key]['cle'] = $key;
|
|
||||||
$date[$key] = $row['dateCloture'];
|
|
||||||
$duree[$key] = $row['duree'];
|
|
||||||
$devise[$key] = $row['devise'];
|
|
||||||
$unite[$key] = $row['unite'];
|
|
||||||
$cle[$key] = $row['cle'];
|
|
||||||
}
|
|
||||||
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
|
|
||||||
|
|
||||||
//Tri des autres tableaux
|
|
||||||
$tempRatiosEntrep = $ratiosEntrep;
|
|
||||||
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
|
|
||||||
$tempRatiosSecteur = $ratiosSecteur;
|
|
||||||
$i = 0;
|
|
||||||
foreach ($bilansInfos as $row){
|
|
||||||
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
|
|
||||||
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
|
|
||||||
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//Fin de tri des tableaux
|
|
||||||
|
|
||||||
$dataActif = array( graphPercent('r51','r22'),
|
|
||||||
graphPercent('r52','r22'),
|
|
||||||
graphPercent('r53','r22'),
|
|
||||||
graphPercent('r60','r22'),
|
|
||||||
graphPercent('r61','r22'),
|
|
||||||
graphPercent('r62','r22'),
|
|
||||||
graphPercent('r63','r22'),
|
|
||||||
);
|
|
||||||
$firephp->log($dataActif, 'scorews - dataActif');
|
|
||||||
|
|
||||||
$dataPassif = array( graphPercent('r70','r22'),
|
|
||||||
graphPercent('r71','r22'),
|
|
||||||
graphPercent('r72','r22'),
|
|
||||||
graphPercent('r83','r22'),
|
|
||||||
graphPercent('r84','r22'),
|
|
||||||
graphPercent('r85','r22'),
|
|
||||||
graphPercent('r86','r22'),
|
|
||||||
graphPercent('r87','r22'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$dataSIG = array( graphPercent('r101','r101')-graphPercent('r122','r101'),
|
|
||||||
graphPercent('r122','r101')-graphPercent('r130','r101'),
|
|
||||||
graphPercent('r130','r101')-graphPercent('r140','r101'),
|
|
||||||
graphPercent('r140','r101')-graphPercent('r150','r101'),
|
|
||||||
graphPercent('r150','r101')-graphPercent('r170','r101'),
|
|
||||||
graphPercent('r170','r101')-graphPercent('r199','r101'),
|
|
||||||
graphPercent('r199','r101'),
|
|
||||||
);
|
|
||||||
|
|
||||||
cache_delete();
|
|
||||||
cache_add('bilansInfos', $bilansInfos);
|
|
||||||
cache_add('ratiosInfos', $ratiosInfos);
|
|
||||||
cache_add('ratiosEntrep', $ratiosEntrep);
|
|
||||||
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
|
|
||||||
cache_add('dataActif', $dataActif);
|
|
||||||
cache_add('dataPassif', $dataPassif);
|
|
||||||
cache_add('dataSIG', $dataSIG);
|
|
||||||
$return = array('bilansInfos'=> $bilansInfos, 'ratiosInfo'=>$ratiosInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol,'dataActif'=>$dataActif, 'dataPassif'=>$dataPassif, 'dataSIG'=>$dataSIG);
|
|
||||||
|
|
||||||
}catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
$return = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function scoresws_ratios($siret, $siren, $idEntreprise)
|
function scoresws_ratios($siret, $siren, $idEntreprise)
|
||||||
{
|
{
|
||||||
global $client, $fileName, $bilansInfos, $ratiosSecteur, $ratiosEntrep, $ratiosInfos, $firephp;
|
global $client, $fileName, $bilansInfos, $ratiosSecteur, $ratiosEntrep, $ratiosInfos, $ratiosSecteur, $page, $firephp;
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'ratios-'.$idEntreprise;
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'ratios-'.$idEntreprise;
|
||||||
}else{ $fileName = 'ratios-'.$siret; }
|
}else{ $fileName = 'ratios-'.$siren; }
|
||||||
$fileName.= '-0';
|
|
||||||
if($ratio!=''){$fileName.='-'.$ratio;}
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
|
cache_filename($fileName);
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
||||||
{
|
{
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
$bilansInfos = cache_get('bilansInfos');
|
||||||
@ -229,51 +82,51 @@ function scoresws_ratios($siret, $siren, $idEntreprise)
|
|||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
$ratiosInfos = cache_get('ratiosInfos');
|
||||||
$ratiosSecteur = cache_get('ratiosSecteur');
|
$ratiosSecteur = cache_get('ratiosSecteur');
|
||||||
$return = array('bilansInfos'=>$bilansInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol, 'ratiosInfos'=>$ratiosInfos,'ratiosSecteur'=>$ratiosSecteur);
|
$dataActif = cache_get('dataActif');
|
||||||
|
$dataPassif = cache_get('dataPassif');
|
||||||
|
$dataSIG = cache_get('dataSIG');
|
||||||
|
$return = array(
|
||||||
|
'bilansInfos'=>$bilansInfos,
|
||||||
|
'ratiosEntrep'=>$ratiosEntrep,
|
||||||
|
'ratiosEntrepEvol'=>$ratiosEntrepEvol,
|
||||||
|
'ratiosInfos'=>$ratiosInfos,
|
||||||
|
'ratiosSecteur'=>$ratiosSecteur,
|
||||||
|
'dataActif'=>$dataActif,
|
||||||
|
'dataPassif'=>$dataPassif,
|
||||||
|
'dataSIG'=>$dataSIG
|
||||||
|
);
|
||||||
}else{
|
}else{
|
||||||
cache_delete();
|
|
||||||
try {
|
try {
|
||||||
$O = $client->getRatios($siren, 'bilan');
|
$O = $client->getRatios($siren, $page);
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
$bilansInfos = $O['result']['BilansInfos'];
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
$ratiosInfos = $O['result']['RatiosInfos'];
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
||||||
$ratiosSecteur = $O['result']['RatiosSecteur'];
|
$ratiosSecteur = $O['result']['RatiosSecteur'];
|
||||||
|
$format = formatRatios($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosInfos, $ratiosSecteur);
|
||||||
//Affichage des dates dans l'ordre décroissant
|
while ( list($key, $val) = each( $format ) )
|
||||||
//Tri des tableaux
|
{
|
||||||
foreach ($bilansInfos as $key => $row) {
|
${$key} = $val;
|
||||||
$bilansInfos[$key]['cle'] = $key;
|
|
||||||
$date[$key] = $row['dateCloture'];
|
|
||||||
$duree[$key] = $row['duree'];
|
|
||||||
$devise[$key] = $row['devise'];
|
|
||||||
$unite[$key] = $row['unite'];
|
|
||||||
$cle[$key] = $row['cle'];
|
|
||||||
}
|
}
|
||||||
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
|
cache_delete();
|
||||||
|
|
||||||
//Tri des autres tableaux
|
|
||||||
$tempRatiosEntrep = $ratiosEntrep;
|
|
||||||
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
|
|
||||||
$tempRatiosSecteur = $ratiosSecteur;
|
|
||||||
$i = 0;
|
|
||||||
foreach ($bilansInfos as $row){
|
|
||||||
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
|
|
||||||
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
|
|
||||||
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//Fin de tri des tableaux
|
|
||||||
|
|
||||||
cache_add('bilansInfos', $bilansInfos);
|
cache_add('bilansInfos', $bilansInfos);
|
||||||
cache_add('ratiosEntrep', $ratiosEntrep);
|
cache_add('ratiosEntrep', $ratiosEntrep);
|
||||||
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
|
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
|
||||||
cache_add('ratiosInfos', $ratiosInfos);
|
cache_add('ratiosInfos', $ratiosInfos);
|
||||||
cache_add('ratiosSecteur', $ratiosSecteur);
|
cache_add('ratiosSecteur', $ratiosSecteur);
|
||||||
|
cache_add('dataActif', $dataActif);
|
||||||
$return = array('bilansInfos'=>$bilansInfos, 'ratiosEntrep'=>$ratiosEntrep, 'ratiosEntrepEvol'=>$ratiosEntrepEvol, 'ratiosInfos'=>$ratiosInfos,'ratiosSecteur'=>$ratiosSecteur);
|
cache_add('dataPassif', $dataPassif);
|
||||||
|
cache_add('dataSIG', $dataSIG);
|
||||||
|
$return = array(
|
||||||
|
'bilansInfos'=>$bilansInfos,
|
||||||
|
'ratiosEntrep'=>$ratiosEntrep,
|
||||||
|
'ratiosEntrepEvol'=>$ratiosEntrepEvol,
|
||||||
|
'ratiosInfos'=>$ratiosInfos,
|
||||||
|
'ratiosSecteur'=>$ratiosSecteur,
|
||||||
|
'dataActif'=>$dataActif,
|
||||||
|
'dataPassif'=>$dataPassif,
|
||||||
|
'dataSIG'=>$dataSIG
|
||||||
|
);
|
||||||
}catch (SoapFault $fault) {
|
}catch (SoapFault $fault) {
|
||||||
require_once 'soaperror.php';
|
require_once 'soaperror.php';
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||||
@ -283,13 +136,12 @@ function scoresws_ratios($siret, $siren, $idEntreprise)
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function scoresws_indiscore($siret, $siren, $idEntreprise)
|
function scoresws_indiscore($siret, $siren, $idEntreprise)
|
||||||
{
|
{
|
||||||
global $client, $firephp;
|
global $client, $firephp;
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'indiscore-'.$idEntreprise;
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'indiscore-'.$idEntreprise;
|
||||||
}else{ $fileName = 'indiscore-'.$siret; }
|
}else{ $fileName = 'indiscore-'.$siren; }
|
||||||
|
|
||||||
cache_filename($fileName);
|
cache_filename($fileName);
|
||||||
|
|
||||||
@ -311,3 +163,60 @@ function scoresws_indiscore($siret, $siren, $idEntreprise)
|
|||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scoresws_dirigeants($siret, $siren, $idEntreprise)
|
||||||
|
{
|
||||||
|
global $client, $firephp;
|
||||||
|
|
||||||
|
if (($siret*1)==0 && ($siren*1)<100) { $fileName = 'dirigeants-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'dirigeants-'.$siret; }
|
||||||
|
$histo = false;
|
||||||
|
if ($_REQUEST['vue']=='histo'){ $fileName .= '-histo'; $histo=true; }
|
||||||
|
cache_filename($fileName);
|
||||||
|
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
||||||
|
$dirs = cache_get('dirs');
|
||||||
|
$return = $dirs;
|
||||||
|
}else{
|
||||||
|
try {
|
||||||
|
$O = $client->getDirigeants($siren, $histo);
|
||||||
|
$dirs = $O['result'];
|
||||||
|
cache_delete();
|
||||||
|
cache_add('dirs', $dirs);
|
||||||
|
$return = $dirs;
|
||||||
|
} catch (SoapFault $fault) {
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||||
|
$return = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function scoresws_liens($siret, $siren, $idEntreprise)
|
||||||
|
{
|
||||||
|
global $client, $firephp;
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){
|
||||||
|
$fileName = 'liens-'.$idEntreprise;
|
||||||
|
}else{
|
||||||
|
$fileName = 'liens-'.$siret;
|
||||||
|
}
|
||||||
|
cache_filename($fileName);
|
||||||
|
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
||||||
|
$liens = cache_get('liens');
|
||||||
|
$return = $liens;
|
||||||
|
}else{
|
||||||
|
try {
|
||||||
|
$O = $client->getLiens($siren, true);
|
||||||
|
$liens = $O['result'];
|
||||||
|
cache_delete();
|
||||||
|
cache_add('liens', $liens);
|
||||||
|
$return = $liens;
|
||||||
|
} catch (SoapFault $fault) {
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||||
|
$return = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function block_synthese($wsresult)
|
|
||||||
{
|
|
||||||
$page = array();
|
|
||||||
$page['titre'] = 'SYNTHÈSE';
|
|
||||||
$page['blocks'] = array();
|
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
$page['blocks'][$i]['titre'] = '';
|
|
||||||
$page['blocks'][$i]['ligne'] = array();
|
|
||||||
$lignes = array();
|
|
||||||
|
|
||||||
$page['blocks'][$i]['ligne'] = $lignes;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
function theme_blocks($blocks)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$html = '';
|
|
||||||
foreach($blocks as $block)
|
|
||||||
{
|
|
||||||
if( isset($block['titre']) && $block['titre']!='' ){ $html.= '<h2>'.$block['titre'].'</h2>'."\n"; }
|
|
||||||
if( isset($block['class']) && $block['class']!='' ){ $class = ' class='.$block['class']; }else{ $class = ''; }
|
|
||||||
if( isset($block['ligne']) && count($block['ligne']>0) )
|
|
||||||
{
|
|
||||||
$html.='<table'.$class.'>'."\n";
|
|
||||||
foreach($block['ligne'] as $ligne)
|
|
||||||
{
|
|
||||||
if($ligne!=FALSE)
|
|
||||||
{
|
|
||||||
$html.='<tr>'."\n";
|
|
||||||
$html.='<td width="30"> </td>'."\n";
|
|
||||||
$html.='<td width="200" class="StyleInfoLib">'.$ligne['intitule'].'</td>'."\n";
|
|
||||||
$html.='<td width="350" class="StyleInfoData">'.$ligne['valeur'].'</td>'."\n";
|
|
||||||
$html.='</tr>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html.='</table>'."\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function theme_block($page)
|
|
||||||
{
|
|
||||||
global $firephp;
|
|
||||||
$blocks = $page['blocks'];
|
|
||||||
$page_html = '';
|
|
||||||
if( isset($page['titre']) && $page['titre']!='' ){ $page_html.= '<h1>'.$page['titre'].'</h1>'."\n"; }
|
|
||||||
$firephp->log($page_html, 'page_html');
|
|
||||||
if( isset($page['blocks']) )
|
|
||||||
{
|
|
||||||
$blocks_html = theme_blocks($blocks);
|
|
||||||
}
|
|
||||||
$page_html.= $blocks_html;
|
|
||||||
return $page_html;
|
|
||||||
}
|
|
@ -18,6 +18,7 @@ require_once 'phpmailer/class.phpmailer.php';
|
|||||||
*/
|
*/
|
||||||
function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
||||||
|
|
||||||
|
global $firephp;
|
||||||
$message = 'Request : '. htmlspecialchars($clientSoap->__getLastRequest()) . '<br/><br/>' .
|
$message = 'Request : '. htmlspecialchars($clientSoap->__getLastRequest()) . '<br/><br/>' .
|
||||||
'Response : '. htmlspecialchars($clientSoap->__getLastResponse()) . '<br/><br/>';
|
'Response : '. htmlspecialchars($clientSoap->__getLastResponse()) . '<br/><br/>';
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ function getSurveillance($page, $siret){
|
|||||||
'liasse' => 'survbilan',
|
'liasse' => 'survbilan',
|
||||||
'indiscore' => 'survscore',
|
'indiscore' => 'survscore',
|
||||||
'actes' => 'survactes',
|
'actes' => 'survactes',
|
||||||
|
'greffes' => 'survactes',
|
||||||
'dirigeants' => 'survdirigeants',
|
'dirigeants' => 'survdirigeants',
|
||||||
);
|
);
|
||||||
$assocPageSource = array(
|
$assocPageSource = array(
|
||||||
@ -100,14 +101,19 @@ function getSurveillance($page, $siret){
|
|||||||
);
|
);
|
||||||
$return = '';
|
$return = '';
|
||||||
$firephp->log($_SESSION,'SESSION');
|
$firephp->log($_SESSION,'SESSION');
|
||||||
//if(preg_match('/'.$assocPageDroit[$page].'/i', $_SESSION['tabInfo']['droits'])){
|
if(preg_match('/'.$assocPageDroit[$page].'\b/i', $_SESSION['tabInfo']['droits']))
|
||||||
if(preg_match('/voirsurv/i', $_SESSION['tabInfo']['pref']) && inSurveillance($assocPageSource[$page], $siret)){
|
{
|
||||||
|
if( preg_match('/voirsurv\b/i', $_SESSION['tabInfo']['pref']) &&
|
||||||
|
inSurveillance($assocPageSource[$page], $siret))
|
||||||
|
{
|
||||||
$return = '<br/>L\'entité est sous surveillance.'."\n";
|
$return = '<br/>L\'entité est sous surveillance.'."\n";
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$notEmail = array('testreunica', 'reunicacsf');
|
$notEmail = array('testreunica', 'reunicacsf');
|
||||||
$return = formSurveillance($assocPageSource[$page], $siret, $notEmail);
|
$return = formSurveillance($assocPageSource[$page], $siret, $notEmail);
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +130,6 @@ function getSurveillance($page, $siret){
|
|||||||
function inSurveillance($source, $siret){
|
function inSurveillance($source, $siret){
|
||||||
global $client;
|
global $client;
|
||||||
global $firephp;
|
global $firephp;
|
||||||
$firephp->log('inSurveillance');
|
|
||||||
try{
|
try{
|
||||||
$result = $client->getSurveillances($siret,$source);
|
$result = $client->getSurveillances($siret,$source);
|
||||||
if(count($result['results']['reponses'])>0 ){
|
if(count($result['results']['reponses'])>0 ){
|
||||||
|
56
includes/theme/theme.php
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
// Génération de tableau
|
||||||
|
function theme_table($table, $attrs)
|
||||||
|
{
|
||||||
|
$return = '<table'.theme_attr($attrs).'>';
|
||||||
|
foreach($table['data'] as $row)
|
||||||
|
{
|
||||||
|
$return.= theme_tablerow($row['data'], $row['attrs']);
|
||||||
|
}
|
||||||
|
$return.= '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Génération d'une ligne de tableau
|
||||||
|
function theme_tablerow($data, $attrs)
|
||||||
|
{
|
||||||
|
$return = '<tr'.theme_attr($attrs).'>';
|
||||||
|
if( isset($row['head']) ) $return.= theme_tablehead($row['data']);
|
||||||
|
else $return.= theme_tablecell($row['data']);
|
||||||
|
$return.= '</tr>';
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Génération entete de tableau
|
||||||
|
function theme_tablehead($data, $attrs)
|
||||||
|
{
|
||||||
|
return '<th'.theme_attr($attrs).'>'.$data['data'].'</th>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Génération cellule
|
||||||
|
function theme_tablecell($data, $attrs)
|
||||||
|
{
|
||||||
|
return '<td'.theme_attr($attrs).'>'.$data['data'].'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Génération d'un div
|
||||||
|
function theme_div()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function theme_attr($attributs)
|
||||||
|
{
|
||||||
|
$attrs = '';
|
||||||
|
if(is_array($attributs) && count($attributs)>0)
|
||||||
|
{
|
||||||
|
foreach( $attributes as $attr_name as $attr_value )
|
||||||
|
{
|
||||||
|
$attrs.=' '.$attr_name.'="'.$attr_value.'"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $attrs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -111,9 +111,7 @@ function overridePermPage($page){
|
|||||||
'scorecsf' => array(34),
|
'scorecsf' => array(34),
|
||||||
'enquetec' => array(34),
|
'enquetec' => array(34),
|
||||||
);
|
);
|
||||||
$loginAllowOnly = array(
|
$loginAllowOnly = array();
|
||||||
'international_recherche' => array( 'mricois', 'mheitz' ,'jmartory' ,'ylenaour' ,'fzicaro' ,'mcochet' ,'olecce'),
|
|
||||||
);
|
|
||||||
$loginDeny = array();
|
$loginDeny = array();
|
||||||
$return = TRUE;
|
$return = TRUE;
|
||||||
//idClient non autorisé
|
//idClient non autorisé
|
||||||
|
@ -8,6 +8,8 @@ $definePerms = array(
|
|||||||
'IPARI' => array( 'init' => '', 'txt' => 'Investigation par l\'image IparI©'),
|
'IPARI' => array( 'init' => '', 'txt' => 'Investigation par l\'image IparI©'),
|
||||||
'MARQUES' => array( 'init' => '', 'txt' => 'Marques déposées'),
|
'MARQUES' => array( 'init' => '', 'txt' => 'Marques déposées'),
|
||||||
'INDISCORE' => array( 'init' => '', 'txt' => 'indiScore©'),
|
'INDISCORE' => array( 'init' => '', 'txt' => 'indiScore©'),
|
||||||
|
'INDISCORE2' => array( 'init' => '', 'txt' => 'Rapport synthetique'),
|
||||||
|
'INDISCORE3' => array( 'init' => '', 'txt' => 'Rapport complet'),
|
||||||
'SCORECSF' => array( 'init' => '', 'txt' => 'Score CSF'),
|
'SCORECSF' => array( 'init' => '', 'txt' => 'Score CSF'),
|
||||||
'EVENINSEE' => array( 'init' => '', 'txt' => 'Évènements INSEE'),
|
'EVENINSEE' => array( 'init' => '', 'txt' => 'Évènements INSEE'),
|
||||||
'AVISINSEE' => array( 'init' => '', 'txt' => 'Avis de situation INSEE'),
|
'AVISINSEE' => array( 'init' => '', 'txt' => 'Avis de situation INSEE'),
|
||||||
@ -35,7 +37,7 @@ $definePerms = array(
|
|||||||
function hasPerm($perm, $userInfos = ''){
|
function hasPerm($perm, $userInfos = ''){
|
||||||
$return = TRUE;
|
$return = TRUE;
|
||||||
if($userInfos == ''){ $userInfos = $_SESSION['tabInfo']; }
|
if($userInfos == ''){ $userInfos = $_SESSION['tabInfo']; }
|
||||||
if ( !preg_match('/'.$perm.'/i', $userInfos['droits'])) $return = FALSE;
|
if ( !preg_match('/'.$perm.'\b/i', $userInfos['droits'])) $return = FALSE;
|
||||||
//Surcharger les droits
|
//Surcharger les droits
|
||||||
if(!overridePerm($perm)){ $return = FALSE; }
|
if(!overridePerm($perm)){ $return = FALSE; }
|
||||||
return $return;
|
return $return;
|
||||||
@ -70,7 +72,6 @@ function formElementPerm($userInfos){
|
|||||||
$return = '';
|
$return = '';
|
||||||
foreach($definePerms as $perm => $infos){
|
foreach($definePerms as $perm => $infos){
|
||||||
if(overridePerm($perm)){
|
if(overridePerm($perm)){
|
||||||
$firephp->log(hasPerm($perm, $userInfos), 'hasPerm');
|
|
||||||
(hasPerm($perm, $userInfos)==TRUE) ? $checked = 'checked' : $checked = $infos['init'];
|
(hasPerm($perm, $userInfos)==TRUE) ? $checked = 'checked' : $checked = $infos['init'];
|
||||||
($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur') ? $disabled = '' : $disabled = 'disabled' ;
|
($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur') ? $disabled = '' : $disabled = 'disabled' ;
|
||||||
$return.= '<input type="checkbox" name="frmOptions[droits][]" value="'.strtolower($perm).'" '.$checked.' '.$disabled.' class="noborder"/>'.$infos['txt'].'<br/>'."\n";
|
$return.= '<input type="checkbox" name="frmOptions[droits][]" value="'.strtolower($perm).'" '.$checked.' '.$disabled.' class="noborder"/>'.$infos['txt'].'<br/>'."\n";
|
||||||
|
@ -47,8 +47,8 @@ if($page=='dirigeants' && $_REQUEST['vue']=='histo'){
|
|||||||
$mil = explode(',',$_REQUEST['mil']);
|
$mil = explode(',',$_REQUEST['mil']);
|
||||||
$annee = substr($mil[0],-10);
|
$annee = substr($mil[0],-10);
|
||||||
$annee = str_replace('/', '', $annee);
|
$annee = str_replace('/', '', $annee);
|
||||||
$firephp->log($annee, 'annee');
|
$indice = str_replace('/', '', substr($mil[0], 0, 11));
|
||||||
$fileName.= '-'.$annee;
|
$fileName.= '-'.$indice;
|
||||||
}
|
}
|
||||||
}elseif($page=='ratios'){
|
}elseif($page=='ratios'){
|
||||||
if(isset($_REQUEST['mil'])){
|
if(isset($_REQUEST['mil'])){
|
||||||
|
@ -13,6 +13,15 @@ if($nomFic == ''){
|
|||||||
print 'Impossible de générer le document.';
|
print 'Impossible de générer le document.';
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
/** Déclation du client Soap auprès du webservice **/
|
||||||
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
|
'soap_version' => SOAP_1_1,
|
||||||
|
'location' => 'http://78.31.45.206/ws/',
|
||||||
|
'uri' => 'http://78.31.45.206/',
|
||||||
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
|
'password' => $_SESSION['tabInfo']['password']
|
||||||
|
));
|
||||||
|
|
||||||
require_once 'surveillance/survliste.php';
|
require_once 'surveillance/survliste.php';
|
||||||
$file = PATH_DATA.'/survliste/'.$nomFic;
|
$file = PATH_DATA.'/survliste/'.$nomFic;
|
||||||
$file2 = $file.'.bz2';
|
$file2 = $file.'.bz2';
|
||||||
@ -24,7 +33,7 @@ if($nomFic == ''){
|
|||||||
require_once 'soaperror.php';
|
require_once 'soaperror.php';
|
||||||
processSoapFault($client,$fault,$tabInfo);
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
}
|
}
|
||||||
$page = getUrl(WEBSERVICE_URI.'csv/'.$nomFic.'.bz2', '', '', '', false);
|
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2', '', '', '', false);
|
||||||
$body = $page['body'];
|
$body = $page['body'];
|
||||||
$fp=@fopen($file2, 'w');
|
$fp=@fopen($file2, 'w');
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
www/img/smoothness/ui-bg_flat_0_aaaaaa_40x100.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
www/img/smoothness/ui-bg_flat_75_ffffff_40x100.png
Normal file
After Width: | Height: | Size: 178 B |
BIN
www/img/smoothness/ui-bg_glass_55_fbf9ee_1x400.png
Normal file
After Width: | Height: | Size: 144 B |
BIN
www/img/smoothness/ui-bg_glass_65_ffffff_1x400.png
Normal file
After Width: | Height: | Size: 105 B |
BIN
www/img/smoothness/ui-bg_glass_75_dadada_1x400.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
www/img/smoothness/ui-bg_glass_75_e6e6e6_1x400.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
www/img/smoothness/ui-bg_glass_95_fef1ec_1x400.png
Normal file
After Width: | Height: | Size: 119 B |
BIN
www/img/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png
Normal file
After Width: | Height: | Size: 101 B |
BIN
www/img/smoothness/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
www/img/smoothness/ui-icons_2e83ff_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
www/img/smoothness/ui-icons_454545_256x240.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
www/img/smoothness/ui-icons_888888_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
www/img/smoothness/ui-icons_cd0a0a_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
@ -15,7 +15,7 @@ $tabStyles = array(
|
|||||||
),
|
),
|
||||||
'styles_synthese' => array(
|
'styles_synthese' => array(
|
||||||
'list' => array('synthese.css'),
|
'list' => array('synthese.css'),
|
||||||
'pages' => array('synthese', 'rsynthese'),
|
'pages' => array('synthese', 'rsynthese', 'rsynthesemin'),
|
||||||
),
|
),
|
||||||
'styles_bilans' => array(
|
'styles_bilans' => array(
|
||||||
'list' => array('bilans.css'),
|
'list' => array('bilans.css'),
|
||||||
@ -29,5 +29,9 @@ $tabStyles = array(
|
|||||||
'list' => array('annonces.css'),
|
'list' => array('annonces.css'),
|
||||||
'pages' => array('annonces', 'rsynthese'),
|
'pages' => array('annonces', 'rsynthese'),
|
||||||
),
|
),
|
||||||
|
'style_surveillance' => array(
|
||||||
|
'list' => array('surveillance.css', 'thickbox.css'),
|
||||||
|
'pages' => array('surveillance'),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
?>
|
?>
|
@ -4,8 +4,6 @@ if($sortie!='prt') require_once 'includejs.php';
|
|||||||
|
|
||||||
$compressoff = false;
|
$compressoff = false;
|
||||||
|
|
||||||
$firephp->log($sortie, 'sortie');
|
|
||||||
|
|
||||||
/* == Traitement des feuilles de styles == */
|
/* == Traitement des feuilles de styles == */
|
||||||
|
|
||||||
if(isset($tabStyles) && count($tabStyles)>0){
|
if(isset($tabStyles) && count($tabStyles)>0){
|
||||||
|
@ -11,11 +11,16 @@ $tabScripts = array(
|
|||||||
),
|
),
|
||||||
'scripts_synthese' => array(
|
'scripts_synthese' => array(
|
||||||
'list' => array('jquery.qtip.js', 'synthese.js'),
|
'list' => array('jquery.qtip.js', 'synthese.js'),
|
||||||
'pages' => array('synthese', 'rsynthese'),
|
'pages' => array('synthese', 'rsynthese', 'rsynthesemin'),
|
||||||
),
|
),
|
||||||
'scripts_ratios' => array(
|
'scripts_ratios' => array(
|
||||||
'list' => array('jquery.qtip.js', 'ratios.js'),
|
'list' => array('jquery.qtip.js', 'ratios.js'),
|
||||||
'pages' => array('ratios', 'rsynthese'),
|
'pages' => array('ratios', 'rsynthese'),
|
||||||
),
|
),
|
||||||
|
'scripts_surveillance' => array(
|
||||||
|
'list' => array('thickbox.js', 'jquery.tablesorter.js', 'jquery.pngFix.js'),
|
||||||
|
'pages' => array('surveillance'),
|
||||||
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
?>
|
?>
|
@ -77,42 +77,6 @@
|
|||||||
//header('Location: http://extranet"'.$NomFichier.'"');
|
//header('Location: http://extranet"'.$NomFichier.'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getLogo($siteWeb, $siren) {
|
|
||||||
require_once 'common/curl.php';
|
|
||||||
if (substr($siteWeb,-1)<>'/')
|
|
||||||
$siteWeb.='/';
|
|
||||||
|
|
||||||
$arrUrl=parse_url($siteWeb);
|
|
||||||
$page=getUrl($siteWeb, '', '', '', false, $arrUrl['host'], '', 3);
|
|
||||||
$body=$page['body'];
|
|
||||||
if (preg_match('/<img(?:.*)src=(?:"|\')((?:.*)logo(?:.*)(?:gif|png|jpg|jpeg))/Ui', $body, $matches)) {
|
|
||||||
$logo=trim(strtr($matches[1],'"\'',' '));
|
|
||||||
$urlLogo=$siteWeb.$logo;
|
|
||||||
|
|
||||||
$tmp=explode('.', basename($logo));
|
|
||||||
$ext=end($tmp);
|
|
||||||
|
|
||||||
$page=getUrl($urlLogo, '', '', $siteWeb, false, $arrUrl['host']);
|
|
||||||
$body=$page['body'];
|
|
||||||
$fp=fopen(PATH_LOGOS.$siren.'.'.$ext, 'a');
|
|
||||||
fwrite($fp, $body);
|
|
||||||
fclose($fp);
|
|
||||||
return '/logos/'.$siren.'.'.$ext;
|
|
||||||
}/*
|
|
||||||
elseif (preg_match_all('/<frame (?:.*)src=(?:"|\')(.*)(?:"|\')(?:.*)>/Ui', $body, $matches)) {
|
|
||||||
foreach ($matches[1] as $url) {
|
|
||||||
if (substr($url,0,1)=='/' || substr($url,0,1)=='./' || substr($url,0,7)<>'http://')
|
|
||||||
$url=$siteWeb.$url;
|
|
||||||
|
|
||||||
//echo "Chercher dans : $url.<br/>";
|
|
||||||
$logo2=getLogo($url, $siren);
|
|
||||||
if ($logo2<>'') return $logo2;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function redimage($img_src,$dst_w,$dst_h) {
|
function redimage($img_src,$dst_w,$dst_h) {
|
||||||
// Lit les dimensions de l'image
|
// Lit les dimensions de l'image
|
||||||
$size = GetImageSize($img_src);
|
$size = GetImageSize($img_src);
|
||||||
|
@ -130,15 +130,20 @@ switch ($page) {
|
|||||||
require_once 'index_annonces.php';
|
require_once 'index_annonces.php';
|
||||||
break;
|
break;
|
||||||
case 'infosreg':
|
case 'infosreg':
|
||||||
$title='Informations réglementées - Siren '. substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
$title='Informations réglementées - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
$page2='infosreg.php';
|
$page2='infosreg.php';
|
||||||
include('./pages/main.php');
|
include('./pages/main.php');
|
||||||
break;
|
break;
|
||||||
case 'bourse':
|
case 'bourse':
|
||||||
$title='Informations boursières - Siren '. substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
$title='Informations boursières - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
$page2='bourse.php';
|
$page2='bourse.php';
|
||||||
include('./pages/main.php');
|
include('./pages/main.php');
|
||||||
break;
|
break;
|
||||||
|
case 'banque':
|
||||||
|
$title='Relation banquaire - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
|
$page2='banque.php';
|
||||||
|
include('./pages/main.php');
|
||||||
|
break;
|
||||||
case 'liasse':
|
case 'liasse':
|
||||||
$title='Liasse fiscale - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
$title='Liasse fiscale - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
$page2='liasse.php';
|
$page2='liasse.php';
|
||||||
@ -208,12 +213,16 @@ switch ($page) {
|
|||||||
$page2='scorescf.php';
|
$page2='scorescf.php';
|
||||||
include('./pages/main.php');
|
include('./pages/main.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'rsynthese':
|
case 'rsynthese':
|
||||||
$title='Rapport de synthèse - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
$title='Rapport de synthèse - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
$page2='rsynthese.php';
|
$page2='rsynthese.php';
|
||||||
include('./pages/main.php');
|
include('./pages/main.php');
|
||||||
break;
|
break;
|
||||||
|
case 'rsynthesemin':
|
||||||
|
$title='Rapport de synthèse - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
|
$page2='rsynthesemin.php';
|
||||||
|
include('./pages/main.php');
|
||||||
|
break;
|
||||||
case 'enquetec' :
|
case 'enquetec' :
|
||||||
$title='Enquête commerciale - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
$title='Enquête commerciale - Siren '.substr($_REQUEST['siret'],0,3).' '.substr($_REQUEST['siret'],3,3).' '.substr($_REQUEST['siret'],6,3);
|
||||||
$page2='enquetec.php';
|
$page2='enquetec.php';
|
||||||
|
@ -33,4 +33,12 @@ $(document).ready(function()
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('[name=mil]').change(function(){
|
||||||
|
document.location.href=$(this).val();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[type=radio][name=typeBilan]').change(function(){
|
||||||
|
document.location.href=$(this).val();
|
||||||
|
});
|
||||||
});
|
});
|
@ -33,4 +33,8 @@ $(document).ready(function()
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input[type=radio][name=typeBilan]').change(function(){
|
||||||
|
document.location.href=$(this).val();
|
||||||
|
});
|
||||||
});
|
});
|
@ -59,7 +59,7 @@ class HTTP_Encoder {
|
|||||||
*
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
public static $encodeToIe6 = false;
|
public static $encodeToIe6 = true;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,13 +20,13 @@ $return = '';
|
|||||||
//Connection au webservice
|
//Connection au webservice
|
||||||
$client = new SoapClient(null, array( 'trace' => 1,
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
'soap_version' => SOAP_1_1,
|
'soap_version' => SOAP_1_1,
|
||||||
'location' => WEBSERVICE_URL,
|
'location' => 'http://78.31.45.206/ws/',
|
||||||
'uri' => WEBSERVICE_URI,
|
'uri' => 'http://78.31.45.206/',
|
||||||
'login' => $_SESSION['tabInfo']['login'],
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
'password' => $_SESSION['tabInfo']['password'],
|
'password' => $_SESSION['tabInfo']['password'],
|
||||||
));
|
));
|
||||||
|
|
||||||
//Récupération de l'url pour le téléchargement du fichier
|
//Recuperation de l'url pour le telechargement du fichier
|
||||||
if($start==1){
|
if($start==1){
|
||||||
try {
|
try {
|
||||||
$O = $client->getLogsClients($date, $details, $idClient, $login, $all);
|
$O = $client->getLogsClients($date, $details, $idClient, $login, $all);
|
||||||
@ -40,21 +40,21 @@ if($start==1){
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$firephp->log($url, 'url');
|
$firephp->log($url, 'url');
|
||||||
//Récupération du nom du fichier
|
//Recuperation du nom du fichier
|
||||||
$tableau = explode('/',$url);
|
$tableau = explode('/',$url);
|
||||||
$file = $tableau[sizeof($tableau)-1];
|
$file = $tableau[sizeof($tableau)-1];
|
||||||
|
|
||||||
//Suppression du fichier si le temps de cache est dépassé
|
//Suppression du fichier si le temps de cache est depasse
|
||||||
if( file_exists(PATH_DATA.'/conso/'.$file) && filemtime(PATH_DATA.'/conso/'.$file) > mktime(date("H")+4, date("i"), date("s"), date("m"), date("d"), date("Y")) )
|
if( file_exists(PATH_DATA.'/conso/'.$file) && filemtime(PATH_DATA.'/conso/'.$file) > mktime(date("H")+4, date("i"), date("s"), date("m"), date("d"), date("Y")) )
|
||||||
{
|
{
|
||||||
unlink(PATH_DATA.'/conso/'.$file);
|
unlink(PATH_DATA.'/conso/'.$file);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Récupération du fichier sur le serveur
|
//Recuperation du fichier sur le serveur
|
||||||
if ( !file_exists(PATH_DATA.'/conso/'.$file))
|
if ( !file_exists(PATH_DATA.'/conso/'.$file))
|
||||||
{
|
{
|
||||||
$firephp->info('Démarage recupération du fichier');
|
$firephp->info('Demarage recuperation du fichier');
|
||||||
//On check si le fichier est présent sur l'url
|
//On check si le fichier est present sur l'url
|
||||||
(isset($_REQUEST['url']) && url!='')? $url=$_REQUEST['url']: '';
|
(isset($_REQUEST['url']) && url!='')? $url=$_REQUEST['url']: '';
|
||||||
$page = getUrl($url, '', '', '', false);
|
$page = getUrl($url, '', '', '', false);
|
||||||
//Fichier non disponible
|
//Fichier non disponible
|
||||||
@ -74,9 +74,9 @@ if($start==1){
|
|||||||
if (file_exists(PATH_DATA.'/conso/'.$file) && filesize(PATH_DATA.'/conso/'.$file)>0)
|
if (file_exists(PATH_DATA.'/conso/'.$file) && filesize(PATH_DATA.'/conso/'.$file)>0)
|
||||||
{
|
{
|
||||||
$firephp->info('Fichier sur le serveur local');
|
$firephp->info('Fichier sur le serveur local');
|
||||||
$return = '<u><a title="Télécharger le fichier" target="_blank" href="/datafile.php?q='.$file.'&type=conso">Cliquez-ici pour télécharger le fichier.</a></u>';
|
$return = '<u><a title="Télécharger le fichier" target="_blank" href="/datafile.php?q='.$file.'&type=conso">Cliquez-ici pour télécharger le fichier.</a></u>';
|
||||||
}elseif (file_exists(PATH_DATA.'/conso/'.$file) && filesize(PATH_DATA.'/conso/'.$file)==0){
|
}elseif (file_exists(PATH_DATA.'/conso/'.$file) && filesize(PATH_DATA.'/conso/'.$file)==0){
|
||||||
$return = 'Aucune consommation enregistré.';
|
$return = 'Aucune consommation enregistrée.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print $return;
|
print $return;
|
||||||
|
@ -6,6 +6,7 @@ require_once 'partenaires/classMTva.php';
|
|||||||
require_once 'partenaires/classMMap.php';
|
require_once 'partenaires/classMMap.php';
|
||||||
require_once 'partenaires/classMCoface.php';
|
require_once 'partenaires/classMCoface.php';
|
||||||
require_once 'common/dates.php';
|
require_once 'common/dates.php';
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
|
||||||
$siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
@ -23,46 +24,13 @@ isset($_REQUEST['vue'])? $vue = $_REQUEST['vue'] : $vue = '';
|
|||||||
$action=$_REQUEST['action'];
|
$action=$_REQUEST['action'];
|
||||||
|
|
||||||
$message='';
|
$message='';
|
||||||
if ($action<>'' && $action<>'logon') die('Paramètres incorrects !');
|
if ($action!='' && $action!='logon') die('Paramètres incorrects !');
|
||||||
|
|
||||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
//Récupération des infos du webservice
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
$annonces = scoresws_annonces($siret, $siren, $idEntreprise, $vue, $idan);
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
|
||||||
if($vue!=''){$fileName.= '-'.$idan;}
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$annonces = cache_get('annonces');
|
|
||||||
//Affichage d'un message d'erreur
|
|
||||||
if($annonces === FALSE) exit;
|
|
||||||
$firephp->info('CACHE');
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
if ($vue=='bodacc' || $_REQUEST['source']==1) $filtre=1;
|
|
||||||
elseif ($vue=='balo') $filtre=2;
|
|
||||||
elseif ($vue=='asso') $filtre=3;
|
|
||||||
else $filtre=0;
|
|
||||||
if ($_SESSION['tabInfo']['entrep']['fj']>9000 && $_SESSION['tabInfo']['entrep']['fj']<9999 && $siren==0)
|
|
||||||
{
|
|
||||||
$filtre=3;
|
|
||||||
}
|
|
||||||
$O = $client->getAnnonces($siren, $filtre, $idan);
|
|
||||||
$annonces = $O['result'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('annonces', $annonces);
|
|
||||||
$firephp->log($annonces, 'annonces');
|
|
||||||
if (count($annonces)==0) {
|
|
||||||
$idan = 0;
|
|
||||||
}
|
|
||||||
} catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($siren != $_SESSION['tabInfo']['entrep']['siren']) {
|
if ($siren != $_SESSION['tabInfo']['entrep']['siren']) {
|
||||||
$O2 = $client->getIdentite($siret);
|
$O2 = $client->getIdentite($siret, 0, false);
|
||||||
$etab = $O2['result'];
|
$etab = $O2['result'];
|
||||||
$tabEntrep = array();
|
$tabEntrep = array();
|
||||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||||
@ -374,6 +342,11 @@ else
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||||||
|
}else{ $fileName = $page.'-'.$siret; }
|
||||||
|
if($vue!=''){$fileName.= '-'.$idan;}
|
||||||
|
|
||||||
require_once 'export.php';
|
require_once 'export.php';
|
||||||
$parseTab = new tabExport();
|
$parseTab = new tabExport();
|
||||||
$parseTab->tab = $annonces;
|
$parseTab->tab = $annonces;
|
||||||
|
@ -26,52 +26,72 @@ else
|
|||||||
* @param boolean $force True aller obligatoirement le chercher à l'insee
|
* @param boolean $force True aller obligatoirement le chercher à l'insee
|
||||||
* @return string Le PDF demandé
|
* @return string Le PDF demandé
|
||||||
*/
|
*/
|
||||||
function getAvisSituation($siret, $format='pdf', $force=0) {
|
function getAvisSituation($siret, $format='pdf', $force=0)
|
||||||
|
{
|
||||||
$force=$force*1;
|
$force=$force*1;
|
||||||
$date=date('Ymd');
|
$date=date('Ymd');
|
||||||
$siren=trim(substr($siret,0,9));
|
$siren=trim(substr($siret,0,9));
|
||||||
$nic=trim(substr($siret,9,5));
|
$nic=trim(substr($siret,9,5));
|
||||||
$fichier = PATH_DATA.'/pdf/avis-'.$siren.'-'.$nic.'-'.$date.'.pdf';
|
$fichier = PATH_DATA.'/pdf/avis-'.$siren.'-'.$nic.'-'.$date.'.pdf';
|
||||||
if ($format<>'pdf') return 'Format pdf uniquement';
|
if ($format!='pdf') return 'Format pdf uniquement';
|
||||||
if ($force==0 && file_exists($fichier)) {
|
if ($force==0 && file_exists($fichier))
|
||||||
|
{
|
||||||
// On délivre l'avis en base
|
// On délivre l'avis en base
|
||||||
$body=file_get_contents($fichier);
|
return file_get_contents($fichier);
|
||||||
} else {
|
}
|
||||||
/** Initialisation de la session sur le site de l'Insee
|
else
|
||||||
**/
|
{
|
||||||
$url='http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp';
|
/** Initialisation de la session sur le site de l'Insee **/
|
||||||
|
$url = 'http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp';
|
||||||
//http://avis-situation-sirene.insee.fr/avisituV2/jsp/avis.jsp';
|
//http://avis-situation-sirene.insee.fr/avisituV2/jsp/avis.jsp';
|
||||||
$referer=$cookie='';
|
$referer = $cookie = '';
|
||||||
$page=getUrl($url, $cookie, '', $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
$page = getUrl($url, $cookie, '', $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
||||||
$referer=$url;
|
//Code en 4xx ou 5xx signifie une erreur du serveur
|
||||||
$body=$page['body'];
|
$codeN = floor($page['code']/100);
|
||||||
|
if($codeN==4 || $codeN==5)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
$fp=@fopen($fichier, "a");
|
$referer = $url;
|
||||||
|
$body = $page['body'];
|
||||||
|
$serviceDispo = true;
|
||||||
|
|
||||||
|
//On doit retrouver sur la page
|
||||||
|
/*
|
||||||
|
<form name="demForm" method="post" action="/avisitu/IdentificationListeSiret.do
|
||||||
|
*/
|
||||||
|
if (preg_match("/<form name=\"demForm\" method=\"post\" action=\"\/avisitu\/IdentificationListeSiret.do/Uis", $body, $matches))
|
||||||
|
{
|
||||||
|
$fp = @fopen($fichier, "a");
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
$cookie = $page['header']['Set-Cookie'];
|
||||||
$cookie=$page['header']['Set-Cookie'];
|
|
||||||
usleep(round(rand(500000,2000000)));
|
usleep(round(rand(500000,2000000)));
|
||||||
|
|
||||||
$dep=$depActif='';
|
$dep=$depActif='';
|
||||||
if ($nic=='') $crit='S'; // l'établissement siège
|
if ($nic=='') $crit='S'; // l'établissement siège
|
||||||
else $crit=''; // établissement particulier, saisissez le NIC
|
else $crit=''; // établissement particulier, saisissez le NIC
|
||||||
/* $crit='T'; // tous les établissements de l'entreprise
|
/* $crit='T'; // tous les établissements de l'entreprise
|
||||||
$crit='T'; // tous les établissements de l'entreprise du département $dep
|
$crit='T'; // tous les établissements de l'entreprise du département $dep
|
||||||
$crit='A'; // tous les établissements actifs de l'entreprise
|
$crit='A'; // tous les établissements actifs de l'entreprise
|
||||||
$crit='A'; // tous les établissements actifs de l'entreprise du département $depActif
|
$crit='A'; // tous les établissements actifs de l'entreprise du département $depActif
|
||||||
*/
|
*/
|
||||||
$url='http://avis-situation-sirene.insee.fr/avisitu/IdentificationListeSiret.do';
|
//Post du formulaire
|
||||||
|
$url = 'http://avis-situation-sirene.insee.fr/avisitu/IdentificationListeSiret.do';
|
||||||
//$url='http://avis-situation-sirene.insee.fr/avisituV2/IdentificationDetailEtab.do';
|
//$url='http://avis-situation-sirene.insee.fr/avisituV2/IdentificationDetailEtab.do';
|
||||||
$post=array('siren'=>$siren,
|
$post = array(
|
||||||
'critere'=>$crit, // S pour le siège ou vide avec un NIC !!!
|
'siren' => $siren,
|
||||||
'nic'=>$nic,
|
'critere' => $crit, // S pour le siège ou vide avec un NIC !!!
|
||||||
'departement'=>$dep,
|
'nic' => $nic,
|
||||||
'departement_actif'=>$depActif,
|
'departement' => $dep,
|
||||||
'bSubmit'=>'Valider');
|
'departement_actif' => $depActif,
|
||||||
$page=getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
'bSubmit' => 'Valider');
|
||||||
$body=$page['body'];
|
$page = getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
||||||
|
|
||||||
|
$body = $page['body'];
|
||||||
$fp=@fopen($fichier, "a");
|
$fp=@fopen($fichier, "a");
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
@ -136,14 +156,8 @@ function getAvisSituation($siret, $format='pdf', $force=0) {
|
|||||||
$fp=@fopen(PATH_LOGS."avis.csv", "a");
|
$fp=@fopen(PATH_LOGS."avis.csv", "a");
|
||||||
@fwrite($fp, $strCsv);
|
@fwrite($fp, $strCsv);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
/*
|
|
||||||
<div class="contenu" id="etab1">
|
|
||||||
<fieldset id="fieldsetCacheFonce">
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
// $body contient l'avis de situation au format html
|
// $body contient l'avis de situation au format html
|
||||||
|
|
||||||
$tabErreurs=array();
|
$tabErreurs=array();
|
||||||
if (preg_match('/name="erreurs" value="(.*)" class="erreurText" readonly/Ui', $body, $matches1) ||
|
if (preg_match('/name="erreurs" value="(.*)" class="erreurText" readonly/Ui', $body, $matches1) ||
|
||||||
preg_match('/name="erreurs_bis" value="(.*)" class="erreurTextBis" readonly/Ui', $body, $matches2)) {
|
preg_match('/name="erreurs_bis" value="(.*)" class="erreurTextBis" readonly/Ui', $body, $matches2)) {
|
||||||
@ -153,44 +167,67 @@ function getAvisSituation($siret, $format='pdf', $force=0) {
|
|||||||
}
|
}
|
||||||
usleep(round(rand(500000,1000000)));
|
usleep(round(rand(500000,1000000)));
|
||||||
|
|
||||||
if ($format=='pdf') {
|
if ($format=='pdf')
|
||||||
$referer=$url;
|
{
|
||||||
$url='http://avis-situation-sirene.insee.fr/avisitu/AvisPdf.do';
|
$referer = $url;
|
||||||
|
$url = 'http://avis-situation-sirene.insee.fr/avisitu/AvisPdf.do';
|
||||||
//$url='http://avis-situation-sirene.insee.fr/avisituV2/AvisPdf.do';
|
//$url='http://avis-situation-sirene.insee.fr/avisituV2/AvisPdf.do';
|
||||||
$post=array('siren'=>$siren,
|
$post = array(
|
||||||
|
'siren'=>$siren,
|
||||||
'nic'=>$nic,
|
'nic'=>$nic,
|
||||||
'bSubmit'=>'Avis+de+Situation');
|
'bSubmit'=>'Avis+de+Situation'
|
||||||
$page=getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
);
|
||||||
$body=$page['body'];
|
$page = getUrl($url, $cookie, $post, $referer, false, 'avis-situation-sirene.insee.fr', '', 7);
|
||||||
$fp=@fopen($fichier, "w");
|
$body = $page['body'];
|
||||||
|
$fp = @fopen($fichier, "w");
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
//@exec("/var/www/site_extranet/www/pdf/pdftohtml -xml $fichier");
|
//@exec("/var/www/site_extranet/www/pdf/pdftohtml -xml $fichier");
|
||||||
|
} // Fin format PDF
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$body = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $body;
|
return $body;
|
||||||
|
} // Fin erreur initialisation
|
||||||
|
} // Fin fichier disponible
|
||||||
}
|
}
|
||||||
|
|
||||||
$body=getAvisSituation($siret, 'pdf', 1);
|
$body = getAvisSituation($siret, 'pdf', 1);
|
||||||
|
if($body !== false)
|
||||||
|
{
|
||||||
|
|
||||||
header("Pragma: public");
|
header("Pragma: public");
|
||||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
header("Cache-Control: must-revalidate");
|
header("Cache-Control: must-revalidate");
|
||||||
header("Content-type: application/pdf");
|
header("Content-type: application/pdf");
|
||||||
header("Content-Length: ".strlen($body));
|
header("Content-Length: ".strlen($body));
|
||||||
header('Content-disposition: inline; filename="avis-'.$siret.'.pdf"');// attachement or inline
|
header('Content-disposition: inline; filename="avis-'.$siret.'.pdf"');// attachement or inline
|
||||||
header("Accept-Ranges: ".strlen($body));
|
header("Accept-Ranges: ".strlen($body));
|
||||||
echo $body;
|
echo $body;
|
||||||
|
|
||||||
$client = new SoapClient(null, array( 'trace' => 1,
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
'soap_version' => SOAP_1_1,
|
'soap_version' => SOAP_1_1,
|
||||||
'location' => WEBSERVICE_URL,
|
'location' => WEBSERVICE_URL,
|
||||||
'uri' => WEBSERVICE_URI,
|
'uri' => WEBSERVICE_URI,
|
||||||
'login' => $_SESSION['tabInfo']['login'],
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
'password' => $_SESSION['tabInfo']['password']));
|
'password' => $_SESSION['tabInfo']['password']));
|
||||||
$O = $client->setLog('avis_situation'.$vue, $siret, 0, $option);
|
$O = $client->setLog('avis_situation'.$vue, $siret, 0, $option);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Envoi mail erreur
|
||||||
|
mail( 'support@scores-decisions.com',"Avis Situation INSEE",
|
||||||
|
'Accès impossible au site de situation INSEE : '.$_REQUEST['siren'].EOL.
|
||||||
|
'http://avis-situation-sirene.insee.fr'.EOL.
|
||||||
|
'pour login '.$_SESSION['tabInfo']['login'].EOL
|
||||||
|
);
|
||||||
|
|
||||||
|
//Affichage message d'erreur
|
||||||
|
echo '<h3>Le site partenaire n\'a pas répondu correctement ou est indisponible. Merci d\'essayer à nouveau ultérieurement.</h3>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
110
www/pages/banque.php
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?php
|
||||||
|
if (!$_SESSION['connected']) {
|
||||||
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once 'cache/cache.php';
|
||||||
|
|
||||||
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
|
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||||||
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||||||
|
}else{ $fileName = $page.'-'.$siret; }
|
||||||
|
cache_filename($fileName);
|
||||||
|
|
||||||
|
|
||||||
|
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
||||||
|
{
|
||||||
|
$rbanque = cache_get('rbanque');
|
||||||
|
}else{
|
||||||
|
try {
|
||||||
|
$O = $client->getBanques($siren);
|
||||||
|
$rbanque = $O['results'];
|
||||||
|
cache_delete();
|
||||||
|
cache_add('rbanque', $rbanque);
|
||||||
|
} catch (SoapFault $fault) {
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
||||||
|
$soaperror = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
ul.relation {list-style-type:none;}
|
||||||
|
ul.relation li { clear:both; }
|
||||||
|
.banque { text-decoration:underline; width:35%; float:left; margin-bottom:10px; }
|
||||||
|
.adresse { width:30%; float:left; margin-bottom:10px;}
|
||||||
|
.codeBanque { width:10%; float:left }
|
||||||
|
.codeGuichet { width:10%; float:left; }
|
||||||
|
.clearfix:after {
|
||||||
|
content: ".";
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="center">
|
||||||
|
<h1 class="titre">RELATIONS BANCAIRES</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Liste des relations bancaires</h2>
|
||||||
|
<?php
|
||||||
|
if( count($rbanque)==0 && isset($soaperror) )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<p>Impossible de récupérer les informations.</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
elseif( count($rbanque)==0 )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<p>Aucune information.</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
elseif( count($rbanque)>0 )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<ul class="relation clearfix">
|
||||||
|
<?php
|
||||||
|
$firephp->log($rbanque, 'rbanque');
|
||||||
|
foreach($rbanque as $relation)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<div class="banque"><?=$relation['libBanque']?></div>
|
||||||
|
<div class="adresse">
|
||||||
|
<?php if(isset($relation['adresse1']) && $relation['adresse1']!='') {?> <?=$relation['adresse2']?><br/> <?php } ?>
|
||||||
|
<?php if(isset($relation['adresse2']) && $relation['adresse2']!='') {?> <?=$relation['adresse2']?><br/> <?php } ?>
|
||||||
|
<?=$relation['cp']?> <?=$relation['ville']?>
|
||||||
|
</div>
|
||||||
|
<div class="codeBanque"><?php if( $relation['codeBanque']*1!=0 ){ echo $relation['codeBanque']; } ?></div>
|
||||||
|
<div class="codeGuichet"><?php if( $relation['codeGuichet']*1!=0 ){ echo $relation['codeGuichet']; }?></div>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
|
@ -8,103 +8,40 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; /
|
|||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
|
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||||||
|
|
||||||
require_once 'cache/cache.php';
|
require_once 'cache/cache.php';
|
||||||
require_once 'ratios/ratios.php';
|
require_once 'ratios/ratios.php';
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
|
||||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||||||
|
$bilansInfos = $result['bilansInfos'];
|
||||||
|
$ratiosInfos = $result['ratiosInfos'];
|
||||||
|
$ratiosEntrep = $result['ratiosEntrep'];
|
||||||
|
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||||||
|
$ratiosSecteur = $result['ratiosSecteur'];
|
||||||
|
$dataActif = $result['dataActif'];
|
||||||
|
$dataPassif = $result['dataPassif'];
|
||||||
|
$dataSIG = $result['dataSIG'];
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
}else{ $fileName = $page.'-'.$siren; }
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
|
||||||
{
|
$numBilanN = $numBilan['N'];
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
$numBilanC = $numBilan['C'];
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
$numBilanB = $numBilan['B'];
|
||||||
$ratiosEntrep = cache_get('ratiosEntrep');
|
$numBilanA = $numBilan['A'];
|
||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan);
|
||||||
$dataActif = cache_get('dataActif');
|
|
||||||
$dataPassif = cache_get('dataPassif');
|
|
||||||
$dataSIG = cache_get('dataSIG');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$O = $client->getRatios($siren, 'bilan');
|
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
|
||||||
|
|
||||||
//Affichage des dates dans l'ordre décroissant
|
|
||||||
//Tri des tableaux
|
|
||||||
foreach ($bilansInfos as $key => $row) {
|
|
||||||
$bilansInfos[$key]['cle'] = $key;
|
|
||||||
$date[$key] = $row['dateCloture'];
|
|
||||||
$duree[$key] = $row['duree'];
|
|
||||||
$devise[$key] = $row['devise'];
|
|
||||||
$unite[$key] = $row['unite'];
|
|
||||||
$cle[$key] = $row['cle'];
|
|
||||||
}
|
|
||||||
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
|
|
||||||
|
|
||||||
//Tri des autres tableaux
|
|
||||||
$tempRatiosEntrep = $ratiosEntrep;
|
|
||||||
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
|
|
||||||
$tempRatiosSecteur = $ratiosSecteur;
|
|
||||||
$i = 0;
|
|
||||||
foreach ($bilansInfos as $row){
|
|
||||||
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
|
|
||||||
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
|
|
||||||
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
//Fin de tri des tableaux
|
|
||||||
|
|
||||||
$dataActif = array( graphPercent('r51','r22'),
|
|
||||||
graphPercent('r52','r22'),
|
|
||||||
graphPercent('r53','r22'),
|
|
||||||
graphPercent('r60','r22'),
|
|
||||||
graphPercent('r61','r22'),
|
|
||||||
graphPercent('r62','r22'),
|
|
||||||
graphPercent('r63','r22'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$dataPassif = array( graphPercent('r70','r22'),
|
|
||||||
graphPercent('r71','r22'),
|
|
||||||
graphPercent('r72','r22'),
|
|
||||||
graphPercent('r83','r22'),
|
|
||||||
graphPercent('r84','r22'),
|
|
||||||
graphPercent('r85','r22'),
|
|
||||||
graphPercent('r86','r22'),
|
|
||||||
graphPercent('r87','r22'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$dataSIG = array( graphPercent('r101','r101')-graphPercent('r122','r101'),
|
|
||||||
graphPercent('r122','r101')-graphPercent('r130','r101'),
|
|
||||||
graphPercent('r130','r101')-graphPercent('r140','r101'),
|
|
||||||
graphPercent('r140','r101')-graphPercent('r150','r101'),
|
|
||||||
graphPercent('r150','r101')-graphPercent('r170','r101'),
|
|
||||||
graphPercent('r170','r101')-graphPercent('r199','r101'),
|
|
||||||
graphPercent('r199','r101'),
|
|
||||||
);
|
|
||||||
|
|
||||||
cache_delete();
|
|
||||||
cache_add('bilansInfos', $bilansInfos);
|
|
||||||
cache_add('ratiosInfos', $ratiosInfos);
|
|
||||||
cache_add('ratiosEntrep', $ratiosEntrep);
|
|
||||||
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
|
|
||||||
cache_add('dataActif', $dataActif);
|
|
||||||
cache_add('dataPassif', $dataPassif);
|
|
||||||
cache_add('dataSIG', $dataSIG);
|
|
||||||
|
|
||||||
}catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
$('input[type=radio][name=typeBilan]').change(function(){
|
||||||
|
document.location.href=$(this).val();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
|
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
|
||||||
<table>
|
<table>
|
||||||
@ -118,16 +55,44 @@ else
|
|||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
|
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if ( $numBilanN>0 || $numBilanC>0 )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||||
|
<td width="340" class="StyleInfoData">
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||||||
|
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}
|
||||||
|
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr><td width="30"> </td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h2>Bilan actif - passif</h2>
|
<h2>Bilan actif - passif</h2>
|
||||||
@ -285,7 +250,7 @@ if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
|||||||
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
|
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="7" class="graph">
|
<tr><td colspan="7" class="graph">
|
||||||
<?php print bilans_graph_actif($dataActif, $fileName); ?>
|
<?php print bilans_graph_actif($dataActif[0], $fileName.$typeBilan); ?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -447,7 +412,7 @@ if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
|||||||
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
|
<td class="right"><?php print dPercent(0,'r22','r22')?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="7" class="graph">
|
<tr><td colspan="7" class="graph">
|
||||||
<?php print bilans_graph_passif($dataPassif, $fileName);?>
|
<?php print bilans_graph_passif($dataPassif[0], $fileName.$typeBilan);?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -827,7 +792,7 @@ if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
|||||||
<td class="right"><?php print dPercent(0,'r199','r101'); ?></td>
|
<td class="right"><?php print dPercent(0,'r199','r101'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="8" class="graph">
|
<tr><td colspan="8" class="graph">
|
||||||
<?php print bilans_graph_sig($dataSIG, $fileName);?>
|
<?php print bilans_graph_sig($dataSIG[0], $fileName.$typeBilan);?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
if (!$_SESSION['connected']) die();
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
require_once 'partenaires/classMTva.php';
|
|
||||||
require_once 'partenaires/classMMap.php';
|
|
||||||
require_once 'common/dates.php';
|
|
||||||
require_once 'cache/cache.php';
|
|
||||||
|
|
||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
@ -13,39 +8,13 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; /
|
|||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
if ($_REQUEST['vue']=='histo')
|
require_once 'partenaires/classMTva.php';
|
||||||
$histo=true;
|
require_once 'partenaires/classMMap.php';
|
||||||
else
|
require_once 'common/dates.php';
|
||||||
$histo=false;
|
require_once 'cache/cache.php';
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
|
||||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
$dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
|
||||||
if (($siret*1)==0 && ($siren*1)<100){
|
|
||||||
$fileName = $page2.'-'.$idEntreprise;
|
|
||||||
}else{
|
|
||||||
$fileName = $page2.'-'.$siret;
|
|
||||||
}
|
|
||||||
if ($_REQUEST['vue']=='histo'){ $fileName .= '-histo'; }
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$dirs = cache_get('dirs');
|
|
||||||
//Affichage d'un message d'erreur
|
|
||||||
if($dirs === FALSE) exit;
|
|
||||||
$firephp->info('CACHE');
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
$O = $client->getDirigeants($siren, $histo);
|
|
||||||
$dirs = $O['result'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('dirs', $dirs);
|
|
||||||
} catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$firephp->log($dirs,'dirs');
|
|
||||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1>DIRIGEANTS</h1>
|
<h1>DIRIGEANTS</h1>
|
||||||
@ -58,7 +27,7 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
@ -71,7 +40,7 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
if ($histo)
|
if ($_REQUEST['vue']=='histo')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<h2>Historique des dirigeants</h2>
|
<h2>Historique des dirigeants</h2>
|
||||||
@ -81,6 +50,8 @@ if ($histo)
|
|||||||
<td colspan="2" width="550" class="StyleInfoData">
|
<td colspan="2" width="550" class="StyleInfoData">
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
|
if (count($dirs)>0)
|
||||||
|
{
|
||||||
foreach ($dirs as $i=>$dir)
|
foreach ($dirs as $i=>$dir)
|
||||||
{
|
{
|
||||||
$nom=$dir['Societe'].' '.$dir['Nom'].' '.$dir['Prenom'];
|
$nom=$dir['Societe'].' '.$dir['Nom'].' '.$dir['Prenom'];
|
||||||
@ -100,8 +71,10 @@ if ($histo)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (count($dirs)==0)
|
}else
|
||||||
|
{
|
||||||
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@ -117,6 +90,8 @@ if ($histo)
|
|||||||
<td colspan="2" width="550" class="StyleInfoData">
|
<td colspan="2" width="550" class="StyleInfoData">
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
|
if (count($dirs)>0)
|
||||||
|
{
|
||||||
foreach ($dirs as $i=>$dir)
|
foreach ($dirs as $i=>$dir)
|
||||||
{
|
{
|
||||||
$societe = str_replace('&#160;',' ', $dir['Societe']);
|
$societe = str_replace('&#160;',' ', $dir['Societe']);
|
||||||
@ -163,8 +138,11 @@ if ($histo)
|
|||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
if (count($dirs)==0)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@ -175,6 +153,10 @@ if ($histo)
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
if (($siret*1)==0 && ($siren*1)<100) { $fileName = 'dirigeants-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'dirigeants-'.$siret; }
|
||||||
|
if ($_REQUEST['vue']=='histo'){ $fileName .= '-histo'; }
|
||||||
|
|
||||||
//Exportation des données sous forme de fichier
|
//Exportation des données sous forme de fichier
|
||||||
function htmldecode($value){
|
function htmldecode($value){
|
||||||
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
||||||
|
@ -6,10 +6,12 @@ require_once 'utils.php';
|
|||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
$idEntreprise = trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
|
isset($_REQUEST['pays']) ? $pays=$_REQUEST['pays'] : $pays='' ;
|
||||||
|
|
||||||
$commandeEnquete = FALSE;
|
$commandeEnquete = FALSE;
|
||||||
|
|
||||||
if($_REQUEST['submit']){
|
if($_REQUEST['submit']){
|
||||||
@ -25,8 +27,8 @@ if($_REQUEST['submit']){
|
|||||||
if($_REQUEST['InfoUser']['Email']==''){ $fields[] ='Votre Email'; $formError=TRUE;}
|
if($_REQUEST['InfoUser']['Email']==''){ $fields[] ='Votre Email'; $formError=TRUE;}
|
||||||
|
|
||||||
//Info entreprise obligatoire :
|
//Info entreprise obligatoire :
|
||||||
if($_REQUEST['InfoEnq']['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=TRUE;}
|
if( isset($_REQUEST['InfoEnq']['Type']) && $_REQUEST['InfoEnq']['Type']==''){ $fields[] ='Choix du type d\'enquête'; $formError=TRUE;}
|
||||||
if($_REQUEST['InfoEnq']['PrecisionsChoix']==''){ $fields[] ='Précisions de la demande'; $formError=TRUE;}
|
//if($_REQUEST['InfoEnq']['PrecisionsChoix']==''){ $fields[] ='Précisions de la demande'; $formError=TRUE;}
|
||||||
if($_REQUEST['InfoEnq']['PrecisionsChoix']=='1'){
|
if($_REQUEST['InfoEnq']['PrecisionsChoix']=='1'){
|
||||||
if($_REQUEST['InfoEnq']['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=TRUE;}
|
if($_REQUEST['InfoEnq']['Precisions']['Motif']==''){ $fields[] ='Mofif de la demande'; $formError=TRUE;}
|
||||||
}elseif($_REQUEST['InfoEnq']['PrecisionsChoix']=='3' || $_REQUEST['InfoEnq']['PrecisionsChoix']=='4'){
|
}elseif($_REQUEST['InfoEnq']['PrecisionsChoix']=='3' || $_REQUEST['InfoEnq']['PrecisionsChoix']=='4'){
|
||||||
@ -34,7 +36,8 @@ if($_REQUEST['submit']){
|
|||||||
}elseif($_REQUEST['InfoEnq']['PrecisionsChoix']=='5'){
|
}elseif($_REQUEST['InfoEnq']['PrecisionsChoix']=='5'){
|
||||||
if($_REQUEST['InfoEnq']['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=TRUE;}
|
if($_REQUEST['InfoEnq']['Precisions']['Autre']==''){ $fields[] ='Précisions de la demande'; $formError=TRUE;}
|
||||||
}
|
}
|
||||||
if($_REQUEST['InfoEnq']['Anciennete']=='' || !isset($_REQUEST['InfoEnq']['AncienneteDuree']) ){ $fields[] ='Ancienneté'; $formError=TRUE;}
|
|
||||||
|
//if($_REQUEST['InfoEnq']['Anciennete']=='' || !isset($_REQUEST['InfoEnq']['AncienneteDuree']) ){ $fields[] ='Ancienneté'; $formError=TRUE;}
|
||||||
|
|
||||||
if(isset($_REQUEST['InfoEnq']['ImpayeesChoix']) && $_REQUEST['InfoEnq']['ImpayeesChoix']=='oui' ){
|
if(isset($_REQUEST['InfoEnq']['ImpayeesChoix']) && $_REQUEST['InfoEnq']['ImpayeesChoix']=='oui' ){
|
||||||
if($_REQUEST['InfoEnq']['Impayees']['Montant']=='' || $_REQUEST['InfoEnq']['Impayees']['Nombre']=='' || $_REQUEST['InfoEnq']['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=TRUE;}
|
if($_REQUEST['InfoEnq']['Impayees']['Montant']=='' || $_REQUEST['InfoEnq']['Impayees']['Nombre']=='' || $_REQUEST['InfoEnq']['Impayees']['Date']==''){ $fields[] ='Précisions sur les impayées'; $formError=TRUE;}
|
||||||
@ -230,6 +233,7 @@ if($commandeEnquete == FALSE){
|
|||||||
<div id="message"><?php print $message;?></div>
|
<div id="message"><?php print $message;?></div>
|
||||||
|
|
||||||
<form action="./?page=enquetec&siret=<?php print $siret;?>&idEntreprise=<?php print $idEntreprise;?>" method="POST" enctype="multipart/form-data">
|
<form action="./?page=enquetec&siret=<?php print $siret;?>&idEntreprise=<?php print $idEntreprise;?>" method="POST" enctype="multipart/form-data">
|
||||||
|
<input name="pays" value="<?=$pays?>" type="hidden"/>
|
||||||
|
|
||||||
<h2>Entreprise concernée : </h2>
|
<h2>Entreprise concernée : </h2>
|
||||||
|
|
||||||
@ -301,7 +305,7 @@ if($commandeEnquete == FALSE){
|
|||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">Nombre d'échéances</label>
|
<label class="StyleInfoLib">Nombre d'échéances</label>
|
||||||
<div class="field"><input type="text" name="InfoEnq[NbEcheances]" value="<?php print $_REQUEST['InfoEnq']['NbEcheances'];?>"/>;</div>
|
<div class="field"><input type="text" name="InfoEnq[NbEcheances]" value="<?php print $_REQUEST['InfoEnq']['NbEcheances'];?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
@ -363,14 +367,49 @@ else print $user['mail']; ?>"/></div>
|
|||||||
|
|
||||||
<h2>Enquête : </h2>
|
<h2>Enquête : </h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if( $pays=='' )
|
||||||
|
{
|
||||||
|
?>
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">Type d'enquête</label>
|
<label class="StyleInfoLib">Type d'enquête</label>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<input class="noborder" type="radio" id="premier" name="InfoEnq[Type]" value="premier" <?php if($_REQUEST['InfoEnq']['Type']=='premier'){print 'checked="checked"';};?>>EXPRESSE (24 h - encours inférieur à 20K€)
|
<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/>
|
<br/>
|
||||||
<input class="noborder" type="radio" id="gold" name="InfoEnq[Type]" value="gold" <?php if($_REQUEST['InfoEnq']['Type']=='gold'){print 'checked="checked"';};?>>DECISION (72 h - encours supérieur à 20K€)
|
<input class="noborder" type="radio" id="gold" name="InfoEnq[Type]" value="gold" <?php if($_REQUEST['InfoEnq']['Type']=='gold'){print 'checked="checked"';};?>>DECISION ( encours supérieur à 20K€ )
|
||||||
|
<br/>
|
||||||
|
<input class="noborder" type="radio" id="btp" name="InfoEnq[Type]" value="btp" <?php if($_REQUEST['InfoEnq']['Type']=='btp'){print 'checked="checked"';};?>>SECTEUR BTP
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if( isset($pays) && $pays!='' )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="fieldgrp">
|
||||||
|
<label class="StyleInfoLib">Délais de livraison</label>
|
||||||
|
<div class="field">
|
||||||
|
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="normal" <?php if($_REQUEST['InfoEnq']['Delai']=='normal'){print 'checked="checked"';};?>>Normal
|
||||||
|
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="urgent" <?php if($_REQUEST['InfoEnq']['Delai']=='urgent'){print 'checked="checked"';};?>>Urgent
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
<div class="fieldgrp">
|
||||||
|
<label class="StyleInfoLib">Délais de livraison</label>
|
||||||
|
<div class="field">
|
||||||
|
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="1" <?php if($_REQUEST['InfoEnq']['Delai']=='1'){print 'checked="checked"';};?>>24 h
|
||||||
|
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="2" <?php if($_REQUEST['InfoEnq']['Delai']=='2'){print 'checked="checked"';};?>>72 h
|
||||||
|
<input class="noborder" type="radio" name="InfoEnq[Delai]" value="5" <?php if($_REQUEST['InfoEnq']['Delai']=='5'){print 'checked="checked"';};?>>5 jours ou +
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">Précisions sur la demande</label>
|
<label class="StyleInfoLib">Précisions sur la demande</label>
|
||||||
@ -446,7 +485,6 @@ else print $user['mail']; ?>"/></div>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="retardpaiement">
|
<div id="retardpaiement">
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
|
@ -13,7 +13,6 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; /
|
|||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
$mil=false;
|
$mil=false;
|
||||||
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1 class="titre">LISTE DES ÉVÉNEMENTS</h1>
|
<h1 class="titre">LISTE DES ÉVÉNEMENTS</h1>
|
||||||
@ -26,7 +25,7 @@ $raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -5,6 +5,15 @@ if (!$_SESSION['connected'])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** Déclation du client Soap auprès du webservice **/
|
||||||
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
|
'soap_version' => SOAP_1_1,
|
||||||
|
'location' => 'http://78.31.45.206/ws/',
|
||||||
|
'uri' => 'http://78.31.45.206/',
|
||||||
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
|
'password' => $_SESSION['tabInfo']['password']
|
||||||
|
));
|
||||||
|
|
||||||
$tabInfo = $_SESSION['tabInfo'];
|
$tabInfo = $_SESSION['tabInfo'];
|
||||||
|
|
||||||
if (isset($_REQUEST['nomFic'])) $nomFic = $_REQUEST['nomFic'];
|
if (isset($_REQUEST['nomFic'])) $nomFic = $_REQUEST['nomFic'];
|
||||||
@ -21,7 +30,7 @@ else
|
|||||||
processSoapFault($client,$fault,$tabInfo);
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
}
|
}
|
||||||
//Récupération du fichier
|
//Récupération du fichier
|
||||||
$page=getUrl(WEBSERVICE_URI.'csv/'.$nomFic.'.bz2', '', '', '', false);
|
$page=getUrl('http://78.31.45.206/csv/csv/'.$nomFic.'.bz2', '', '', '', false);
|
||||||
$body=$page['body'];
|
$body=$page['body'];
|
||||||
$fp=@fopen($file2, 'w');
|
$fp=@fopen($file2, 'w');
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
|
@ -12,8 +12,7 @@ $tabInfo = $_SESSION['tabInfo'];
|
|||||||
$mode = $_SESSION['graydon']['mode'];
|
$mode = $_SESSION['graydon']['mode'];
|
||||||
|
|
||||||
require_once 'dbbootstrap.php';
|
require_once 'dbbootstrap.php';
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydon.php';
|
||||||
require_once 'graydon/graydon_log.php';
|
|
||||||
|
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
$q = Doctrine_Query::Create()
|
$q = Doctrine_Query::Create()
|
||||||
@ -35,7 +34,8 @@ $availability = getCountryAvailability($pays);
|
|||||||
//Méthodes de recherche disponible pour les pays
|
//Méthodes de recherche disponible pour les pays
|
||||||
$methods = getCompanyMatchMethods($pays);
|
$methods = getCompanyMatchMethods($pays);
|
||||||
$firephp->log($methods,'methods');
|
$firephp->log($methods,'methods');
|
||||||
if (is_array($methods)){
|
if (is_array($methods))
|
||||||
|
{
|
||||||
$firephp->log($methods,'methods');
|
$firephp->log($methods,'methods');
|
||||||
//Affichage de la meilleur méthode de recherche OU la première
|
//Affichage de la meilleur méthode de recherche OU la première
|
||||||
$lien = 'La meilleure méthode de recherche vous est affiché par défaut.<br/> Effectuer un autre type recherche : ';
|
$lien = 'La meilleure méthode de recherche vous est affiché par défaut.<br/> Effectuer un autre type recherche : ';
|
||||||
@ -73,8 +73,7 @@ if (is_array($methods)){
|
|||||||
print '<div>Il n\'est pas possible de faire une recherche dans la base de ce pays.';
|
print '<div>Il n\'est pas possible de faire une recherche dans la base de ce pays.';
|
||||||
//Vérification des droits
|
//Vérification des droits
|
||||||
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
||||||
//print 'Pour commander une enquête sur ce pays rendez-vous sur cette <a href="/?page=international_enquete&pays='.$pays.'">page</a>.';
|
print 'Pour commander une enquête sur ce pays rendez-vous sur cette <a href="/?page=international_enquete&pays='.$pays.'">page</a>.';
|
||||||
print 'Pour commander une enquête sur ce pays rendez-vous sur cette <a href="#">page</a>.';
|
|
||||||
}else{
|
}else{
|
||||||
print 'Vous n\'avez pas les droits nécessaires pour commander une enquête sur ce pays.';
|
print 'Vous n\'avez pas les droits nécessaires pour commander une enquête sur ce pays.';
|
||||||
}
|
}
|
||||||
|
@ -131,10 +131,10 @@ else
|
|||||||
</table>
|
</table>
|
||||||
<?
|
<?
|
||||||
} // Fin Specificités des associations
|
} // Fin Specificités des associations
|
||||||
elseif ( $dep=='00' || $dep=='57' || $dep=='67' || $dep=='68' || $dep=='97' || $dep=='98' || $vue=='rcs' )
|
/*elseif ( $dep=='00' || $dep=='57' || $dep=='67' || $dep=='68' || $dep=='97' || $dep=='98' || $vue=='rcs' )
|
||||||
{ // Déb ALSACE DOM
|
{ // Déb ALSACE DOM
|
||||||
include('inpi.php');
|
include('inpi.php');
|
||||||
}
|
}*/
|
||||||
else
|
else
|
||||||
{ // Déb hors ALSACE DOM
|
{ // Déb hors ALSACE DOM
|
||||||
if ($action=='commande') {
|
if ($action=='commande') {
|
||||||
@ -525,15 +525,15 @@ else
|
|||||||
// LOG DE LA PAGE
|
// LOG DE LA PAGE
|
||||||
$O2 = $client->setLog('greffe_'.$vue, $siret, 0, $option);
|
$O2 = $client->setLog('greffe_'.$vue, $siret, 0, $option);
|
||||||
|
|
||||||
if ($nbVecteurT<$nbActes) { // Tous les actes ne sont pas dispo en téléchargement, on propose donc l'accès INPI
|
/*if ($nbVecteurT<$nbActes) { // Tous les actes ne sont pas dispo en téléchargement, on propose donc l'accès INPI
|
||||||
/* $origine='G';
|
/* $origine='G';
|
||||||
include('inpi.php');*/
|
include('inpi.php');
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" class="StyleInfoData" colspan="3"><a href="./?<?=$_SERVER['QUERY_STRING']?>&vue=rcs">Tous les actes ne sont pas disponibles en téléchargement immédiat.<br/>Cliquez-ici pour les commander en téléchargement différé</a></td>
|
<td align="center" class="StyleInfoData" colspan="3"><a href="./?<?=$_SERVER['QUERY_STRING']?>&vue=rcs">Tous les actes ne sont pas disponibles en téléchargement immédiat.<br/>Cliquez-ici pour les commander en téléchargement différé</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
}
|
}*/
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
@ -6,6 +6,9 @@ require_once 'utils.php';
|
|||||||
require_once 'common/dates.php';
|
require_once 'common/dates.php';
|
||||||
require_once 'cache/cache.php';
|
require_once 'cache/cache.php';
|
||||||
require_once 'user/user.php';
|
require_once 'user/user.php';
|
||||||
|
require_once 'logos/logos.php';
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
require_once 'scoresws/identite.php';
|
||||||
|
|
||||||
//Traitement des paramètres
|
//Traitement des paramètres
|
||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
@ -25,33 +28,12 @@ if( isset($parametres) && $parametres['info']['page']=='recherche' )
|
|||||||
recherche_saveinfo( array('idEntreprise' => $idEntreprise) );
|
recherche_saveinfo( array('idEntreprise' => $idEntreprise) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Récupération des infos du webservice
|
||||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$etab = cache_get('etab');
|
|
||||||
//Affichage d'un message d'erreur
|
|
||||||
if($etab === FALSE) exit;
|
|
||||||
$firephp->info('CACHE');
|
|
||||||
}else{
|
|
||||||
$firephp->info('WS : getIdentite');
|
|
||||||
try {
|
|
||||||
$O = $client->getIdentite($siret, $idEntreprise);
|
|
||||||
$etab = $O['result'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('etab', $etab);
|
|
||||||
} catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$firephp->log($etab,'etab');
|
$firephp->log($etab,'etab');
|
||||||
|
|
||||||
|
//Enregistrement des elements dans la session
|
||||||
$tabEntrep = array();
|
$tabEntrep = array();
|
||||||
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
$tabEntrep['raisonSociale'] = $etab['Nom'];
|
||||||
$tabEntrep['siren'] = $etab['Siren'];
|
$tabEntrep['siren'] = $etab['Siren'];
|
||||||
@ -71,106 +53,57 @@ $tabEntrep['fj'] = $etab['FJ'];
|
|||||||
|
|
||||||
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
$_SESSION['tabInfo']['entrep'] = $tabEntrep;
|
||||||
|
|
||||||
?>
|
function dRow($lib, $data, $title = '')
|
||||||
<style type="text/css">
|
{
|
||||||
.txtAdresse p {clear:both; float:left; margin:0;}
|
$html = '<tr>'."\n";
|
||||||
.search {float:right; width:150px;}
|
$html.= ' <td width="30"> </td>'."\n";
|
||||||
.search p {margin:0 0 0 20px;}
|
$html.= ' <td width="200" class="StyleInfoLib">'.$lib.'</td>'."\n";
|
||||||
p.adresse {margin:0; padding:0; width:auto;}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
if($title!='') $title = ' title="'.$title.'"';
|
||||||
|
$html.= ' <td width="350" class="StyleInfoData"'.$title.'>'.$data.'</td>'."\n";
|
||||||
|
$html.= '</tr>'."\n";
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1 class="titre">IDENTITÉ DE L'ENTREPRISE</h1>
|
<h1 class="titre">IDENTITÉ DE L'ENTREPRISE</h1>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siret</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' <i>'.substr($etab['Siret'],9,5).'</i>'?></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"><?=substr($etab['SiretSiege'],0,3).' '.substr($etab['SiretSiege'],3,3).' '.substr($etab['SiretSiege'],6,3).' <i>'.substr($etab['SiretSiege'],9,5).'</i>'?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Numéro de TVA Intracom.</td>
|
|
||||||
<td width="350" class="StyleInfoData" valign="middle"><?
|
|
||||||
if($etab['Dept']*1==97) {
|
|
||||||
echo '<a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31991L0680:FR:HTML" target="_blank">Non attribué dans les D.O.M.</a>';
|
|
||||||
} else {
|
|
||||||
echo substr($etab['TvaNumero'],0,2).' '.substr($etab['TvaNumero'],2,2).' '.substr($etab['TvaNumero'],-9);
|
|
||||||
if (!$etab['TvaAttribue'])
|
|
||||||
echo ' <img src="./img/exclamation.png" title="Non validé. Obligatoire sur factures, déclarations d\'échange de biens et de TVA !">';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
<?php
|
||||||
/* On recherche un logo */
|
//Siret
|
||||||
$urlImg='';
|
$element = formatElement('identite', 'siret', array($etab['Siren'], $etab['Siret']));
|
||||||
$siteWeb='';
|
echo dRow($element['lib'], $element['data']);
|
||||||
$locImg=PATH_LOGOS.$etab['Siren'];
|
|
||||||
if (file_exists($locImg.'.gif')) { $urlImg='./logos/'.$etab['Siren'].'.gif'; $ext='.gif'; }
|
|
||||||
elseif (file_exists($locImg.'.png')) { $urlImg='./logos/'.$etab['Siren'].'.png'; $ext='.png'; }
|
|
||||||
elseif (file_exists($locImg.'.jpg')) { $urlImg='./logos/'.$etab['Siren'].'.jpg'; $ext='.jpg'; }
|
|
||||||
elseif (file_exists($locImg.'.jpeg')) { $urlImg='./logos/'.$etab['Siren'].'.jpeg'; $ext='.jpeg'; }
|
|
||||||
|
|
||||||
print '<!-- '.$locImg.' '.$urlImg.'-->';
|
//Siret siege
|
||||||
|
$element = formatElement('identite', 'siretsiege', array($etab['SiretSiege']));
|
||||||
|
echo dRow($element['lib'], $element['data']);
|
||||||
|
|
||||||
if ($urlImg=='' && $etab['Isin']<>'') {
|
//Numéro tva intracommunautaire
|
||||||
$locImg=PATH_LOGOS.$etab['Isin'];
|
$element = formatElement('identite', 'tvanumero', array($etab['TvaNumero'], $etab['TvaAttribue'], $etab['Dept']));
|
||||||
if (file_exists($locImg.'.gif')) { $urlImg='./logos/'.$etab['Isin'].'.gif'; $ext='.gif'; }
|
|
||||||
elseif (file_exists($locImg.'.png')) { $urlImg='./logos/'.$etab['Isin'].'.png'; $ext='.png'; }
|
|
||||||
elseif (file_exists($locImg.'.jpg')) { $urlImg='./logos/'.$etab['Isin'].'.jpg'; $ext='.jpg'; }
|
|
||||||
elseif (file_exists($locImg.'.jpeg')) { $urlImg='./logos/'.$etab['Isin'].'.jpeg'; $ext='.jpeg'; }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (trim($etab['Web'])<>'') {
|
|
||||||
if (substr($etab['Web'],0,7)<>'http://')
|
|
||||||
$siteWeb='http://'.$etab['Web'];
|
|
||||||
else
|
|
||||||
$siteWeb=$etab['Web'];
|
|
||||||
|
|
||||||
if ($urlImg=='' && ($_SESSION['tabInfo']['login']=='ylenaour' ||
|
|
||||||
$_SESSION['tabInfo']['login']=='mpurcarin' ||
|
|
||||||
$_SESSION['tabInfo']['login']=='mcochet' ||
|
|
||||||
$_SESSION['tabInfo']['login']=='aegasse' ||
|
|
||||||
$_SESSION['tabInfo']['login']=='jmartory') )
|
|
||||||
$urlImg=getLogo($siteWeb, $etab['Siren']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($etab['Isin']<>'')
|
|
||||||
{
|
|
||||||
$bourse=$etab['Bourse'];
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Code ISIN</td>
|
<td width="200" class="StyleInfoLib"><?=$element['lib']?></td>
|
||||||
<td width="350" class="StyleInfoData"><a href="./?page=bourse&siret=<?=$etab['Siret']?>" title="Voir les informations boursiéres"><?=$etab['Isin']?></a></td>
|
<td width="350" class="StyleInfoData" valign="middle"><?=$element['data']?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if ($bourse['capitalisation']<>0)
|
//Isin
|
||||||
{
|
$element = formatElement('identite', 'isin', array($etab['Isin'], $etab['Siret']));
|
||||||
?>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
//Capitalisation
|
||||||
<td width="200" class="StyleInfoLib">Capitalisation</td>
|
$element = formatElement('identite', 'capitalisation', array($etab['Bourse'], $etab['Isin']));
|
||||||
<td width="350" class="StyleInfoData"><?=number_format($bourse['capitalisation'],0,'', ' ')?> € au <?=WDate::dateT('Y-m-d','d/m/Y',$bourse['derCoursDate'])?></td>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//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
|
//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
|
||||||
if(($siren*1!=0 ) || ($siren*1>100))
|
list($urlImg, $pathImg) = logo_exist($etab['Siren'], $etab['Isin'], $etab['Web']);
|
||||||
|
if( ( ($siren*1!=0 ) || ($siren*1>100) ) && file_exists($pathImg) )
|
||||||
{
|
{
|
||||||
if ($urlImg<>'' )
|
$tabTmp=@getimagesize($pathImg);
|
||||||
{
|
|
||||||
$tabTmp=@getimagesize($locImg.$ext);
|
|
||||||
$w=$tabTmp[0];
|
$w=$tabTmp[0];
|
||||||
$h=$tabTmp[1];
|
$h=$tabTmp[1];
|
||||||
if ($w>350) $strSize=@redimage($locImg.$ext,350,150);
|
if ($w>350) $strSize=@redimage($pathImg,350,150);
|
||||||
else $strSize='';
|
else $strSize='';
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@ -178,603 +111,130 @@ if(($siren*1!=0 ) || ($siren*1>100))
|
|||||||
<td width="200" class="StyleInfoLib">Logo</td>
|
<td width="200" class="StyleInfoLib">Logo</td>
|
||||||
<td width="350" class="StyleInfoData"><img src="<?=$urlImg?>" <?=$strSize?>/></td>
|
<td width="350" class="StyleInfoData"><img src="<?=$urlImg?>" <?=$strSize?>/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
//Numéro RC
|
//Numéro RC
|
||||||
$flagNewRC = FALSE;
|
$element = formatElement('identite', 'numrc', array($etab['NumRC']));
|
||||||
if (isset($etab['numRC']) && $etab['numRC']!='') {
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
?>
|
|
||||||
<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
|
|
||||||
$flagNewRC = TRUE;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible
|
//Autre identifiant : Numéro WALDEC ou ancien numéro RC si le nouveau n'est pas disponible
|
||||||
if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flagNewRC || substr($etab['AutreId'],0,1)=='W'))
|
$element = formatElement('identite', 'autreid', array($etab['AutreId'], $etab['TribunalLib'], $etab['NumRC']));
|
||||||
{
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$libTrib = '';
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">
|
|
||||||
<?php
|
|
||||||
if (substr($etab['AutreId'],0,1)=='W') print 'Identifiant Association WALDEC';
|
|
||||||
elseif (preg_match('/(A|B|C|D)/i', $etab['AutreId']))
|
|
||||||
{
|
|
||||||
print 'Numéro R.C.';
|
|
||||||
$libTrib = ' RCS '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$etab['TribunalLib']);
|
|
||||||
}
|
|
||||||
elseif (preg_match('/(P)/i', $etab['AutreId']))
|
|
||||||
{
|
|
||||||
print 'Numéro R.S.A.C.';
|
|
||||||
$libTrib = ' RSAC '.preg_replace('/(^TC |^TI |^TGIcc |^TMX )/i','',$etab['TribunalLib']);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$etab['AutreId'].$libTrib?></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
$element = formatElement('identite', 'actif', array($etab['Siren'], $siret, $idEntreprise, $etab['Siege'], $etab['Actif'], $etab['DateClotEt']));
|
||||||
<td width="30"> </td>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="200" class="StyleInfoLib">Etablissement actif
|
|
||||||
<?php
|
|
||||||
if ($etab['Siege']==0)
|
|
||||||
echo '<br/><a title="Voir la fiche d\'identité du siège de l\'entreprise" href="/?page=identite&siret='.$etab['Siren'].'&idEntreprise='.$idEntreprise.'">Accès à la fiche du siège</a>';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
if ($etab['Actif']==1)
|
|
||||||
echo 'Oui';
|
|
||||||
else {
|
|
||||||
echo '<b>NON</b>';
|
|
||||||
$dateCloture=str_replace('-','',$etab['DateClotEt']);
|
|
||||||
if ($etab['DateClotEt']<>'')
|
|
||||||
echo "<i> (Fin d'activité en ".WDate::dateT('Ymd', 'm/Y', $dateCloture).')</i>';
|
|
||||||
}
|
|
||||||
if ($etab['Siren']*1<>0 && preg_match('/AVISINSEE/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
echo ' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret='.$siret.'">(Situation au répertoire SIRENE)</a>';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Situation Jurique + affichage date de radiation
|
//Situation Jurique + affichage date de radiation
|
||||||
$dateRadiation = '';
|
$element = formatElement('identite', 'situationjuridique', array($etab['SituationJuridique'], $etab['DateRadiation'], $etab['Siret'], $idEntreprise));
|
||||||
if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation']));
|
|
||||||
}
|
|
||||||
$firephp->log($etab['SituationJuridique'], 'SituationJuridique');
|
|
||||||
|
|
||||||
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Situation juridique</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
//Procédure collective
|
|
||||||
if ($etab['SituationJuridique']=='P')
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">
|
|
||||||
<font color="red"><b>En procédure collective</b></font>
|
|
||||||
</a>
|
|
||||||
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?>
|
|
||||||
<?php
|
|
||||||
}/*else{
|
|
||||||
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
|
|
||||||
}*/
|
|
||||||
//Radiation
|
|
||||||
if($etab['SituationJuridique']=='RR')
|
|
||||||
{
|
|
||||||
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
|
||||||
}elseif($etab['SituationJuridique']=='RP'){
|
|
||||||
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
|
||||||
}
|
|
||||||
if ($_SESSION['tabInfo']['mode_edition']==1)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]!='R' || $_SESSION['tabInfo']['mode_edition']==1)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
} // Fin Situation juridique
|
|
||||||
?>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Raison sociale & Coordonnées</h2>
|
<h2>Raison sociale & Coordonnées</h2>
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
//Nom
|
//Nom
|
||||||
$title = '';
|
$element = formatElement('identite', 'raisonsociale', array($etab['Nom'], $etab['Nom2'], $etab['NomLong']));
|
||||||
if(isset($etab['NomLong']) && $etab['NomLong']!='' && $etab['NomLong']!=$etab['Nom'] )
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||||
$title = $etab['NomLong'];
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
|
||||||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
|
||||||
<?=$etab['Nom']; if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//Enseigne / Sigle
|
//Enseigne / Sigle
|
||||||
$titre = '';
|
$element = formatElement('identite', 'enseignesigle', array($etab['Enseigne'], $etab['Sigle'], $etab['SigleLong']));
|
||||||
if ($etab['Enseigne']!='' && $etab['Sigle']!=''){
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||||
$titre='Enseigne / Sigle';
|
|
||||||
$lib=$etab['Enseigne'].' / '.$etab['Sigle'];
|
|
||||||
}elseif($etab['Enseigne']!='' && $etab['Sigle']=='' && $etab['SigleLong']!='' ){
|
|
||||||
$titre='Enseigne / Sigle';
|
|
||||||
$lib=$etab['Enseigne'].' / '.$etab['SigleLong'];
|
|
||||||
}elseif($etab['Enseigne']!='' && $etab['Sigle']==''){
|
|
||||||
$titre='Enseigne';
|
|
||||||
$lib=$etab['Enseigne'];
|
|
||||||
}elseif($etab['Enseigne']=='' && $etab['Sigle']!=''){
|
|
||||||
$titre='Sigle';
|
|
||||||
$lib=$etab['Sigle'];
|
|
||||||
}elseif($etab['Enseigne']=='' && $etab['Sigle']=='' && $etab['SigleLong']!=''){
|
|
||||||
$titre='Sigle';
|
|
||||||
$lib=$etab['SigleLong'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$title = '';
|
|
||||||
if( isset($etab['SigleLong']) && $etab['SigleLong']!='' && $etab['SigleLong']!=$etab['Sigle'])
|
|
||||||
$title = $etab['SigleLong'];
|
|
||||||
|
|
||||||
if ($titre!='') {
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">
|
|
||||||
<?=$titre?>
|
|
||||||
</td>
|
|
||||||
<td width="350" class="StyleInfoData" title="<?=$title?>"><?=$lib?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
//Forme juridique
|
//Forme juridique
|
||||||
?>
|
$element = formatElement('identite', 'fj', array($etab['FJ'], $etab['FJ_lib'], $etab['FJ2'], $etab['FJ2_Lib'] ));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$etab['FJ'].' : '.strWsToHtml($etab['FJ_lib']);?>
|
|
||||||
<?php
|
|
||||||
if(isset($etab['FJ2']) && $etab['FJ2']!='' && isset($etab['FJ2_Lib']) && $etab['FJ2_Lib']!='')
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<img src="./img/exclamation.png" title="Forme jurique au RCS : <?=$etab['FJ2_Lib']?> (<?=$etab['FJ2']?>)"/>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//Date d'immatriculation
|
//Date d'immatriculation
|
||||||
$dateImmat = '';
|
$element = formatElement('identite', 'dateimmat', array($etab['DateImmat']));
|
||||||
if(isset($etab['DateImmat']) && $etab['DateImmat']!='' && $etab['DateImmat']!='0000-00-00'){
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$dateImmat = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateImmat']));
|
|
||||||
}
|
|
||||||
if($dateImmat!=''){
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Date d'immatriculation</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$dateImmat?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
//Date de création de l'entreprise
|
//Date de création de l'entreprise
|
||||||
?>
|
$element = formatElement('identite', 'datecreaen', array($etab['DateCreaEn']));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Création de l'entreprise</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
$dateCreationEn=str_replace('-','',$etab['DateCreaEn']);
|
|
||||||
if (substr($dateCreationEn,-2)*1==0)
|
|
||||||
echo WDate::dateT('Ymd', 'm/Y', $dateCreationEn);
|
|
||||||
else
|
|
||||||
echo WDate::dateT('Ymd', 'd/m/Y', $dateCreationEn);
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//Date de création de l'établissement
|
//Date de création de l'établissement
|
||||||
?>
|
$element = formatElement('identite', 'datecreaet', array($etab['DateCreaEt']));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Création de l'établissement</td>
|
//Adresse
|
||||||
<td width="350" class="StyleInfoData">
|
$element = formatElement('identite', 'adresse', array($etab['Adresse'], $etab['Adresse2'], $etab['AdresseNum'], $etab['AdresseRue'], $etab['CP'], $etab['Ville'], $etab['Pays']));
|
||||||
<?php
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$dateCreationEt=str_replace('-','',$etab['DateCreaEt']);
|
|
||||||
if ($dateCreationEt*1<>0) {
|
|
||||||
if (substr($dateCreationEt,-2)*1==0)
|
|
||||||
echo WDate::dateT('Ymd', 'm/Y', $dateCreationEt);
|
|
||||||
else
|
|
||||||
echo WDate::dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
|
||||||
} else echo 'N/C';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
if($etab['AdresseRue'] == ''){ $voie = $etab['Adresse2']; }else{ $voie = $etab['AdresseRue']; }
|
|
||||||
?>
|
|
||||||
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[numVoie]=<?=urlencode($etab['AdresseNum'])?>&formR[voie]=<?=urlencode($voie)?>&formR[cpVille]=<?=urlencode($etab['CP'])?>" title="Rechercher à partir de cette adresse">
|
|
||||||
<p class="adresse"><?php print $etab['Adresse'];?></p>
|
|
||||||
<?php
|
|
||||||
if (preg_match('/CHEZ SOFRADOM/i',$etab['Adresse2']))
|
|
||||||
$etab['Adresse2']='<a title="Voir la fiche d\'identité du domiciliataire de cette entreprise" href="/?page=identite&siret=42495045900018&idEntreprise=6720043">CHEZ SOFRADOM</a>';
|
|
||||||
//http://extranet.devlocal.com/?page=identite&siret=42495045900018&idEntreprise=6720043
|
|
||||||
if ($etab['Adresse2']<>'')
|
|
||||||
print '<p class="adresse">'.$etab['Adresse2'].'</p>';
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
$cp=$etab['CP']*1;
|
|
||||||
if ($cp<>0)
|
|
||||||
print '<p class="adresse">'.$etab['CP'].' '.strWsToHtml($etab['Ville']).'</p>';
|
|
||||||
if ($etab['Pays']<>'' && strtoupper(substr($etab['Pays'],0,3))<>'FRA')
|
|
||||||
print '<p class="adresse">'.strWsToHtml($etab['Pays']).'</p>';
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//Zones prioritaires
|
//Zones prioritaires
|
||||||
//if (@$etab['GeoInfos']['ZUS']<>'NON' || @$etab['GeoInfos']['ZFU']<>'NON' || @$etab['GeoInfos']['ZRU']<>'NON' || @$etab['GeoInfos']['CUCS']<>'NON') {/* && trim(@$etab['GeoInfos']['NCUCS'])<>'')) {*/
|
$element = formatElement('identite', 'zones', array($etab['GeoInfos']));
|
||||||
if (@$etab['GeoInfos']['ZUS']=='OUI' || @$etab['GeoInfos']['ZFU']=='OUI' || @$etab['GeoInfos']['ZRU']=='OUI' || @$etab['GeoInfos']['CUCS']=='OUI' || @$etab['GeoInfos']['ZRR']=='OUI' || @$etab['GeoInfos']['AFR']=='OUI')
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
{
|
|
||||||
/*[GeoInfos] => Array
|
|
||||||
(
|
|
||||||
[ZUS] => OUI
|
|
||||||
[NZUS] => 1127020
|
|
||||||
[ZFU] => OUI
|
|
||||||
[NZFU] => 11270ZF
|
|
||||||
[CUCS] => OUI
|
|
||||||
[NCUCS] => 1127020
|
|
||||||
)*/
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Zones prioritaires</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
if ($etab['GeoInfos']['ZUS']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZUS'].'" target="_blank">ZUS n°'.$etab['GeoInfos']['NZUS'].'</a><br/>';
|
|
||||||
//elseif ($etab['GeoInfos']['ZUS']=='NSP') echo 'Implantation en ZUS à vérifier<br/>';
|
|
||||||
if ($etab['GeoInfos']['ZFU']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZFU'].'" target="_blank">ZFU n°'.$etab['GeoInfos']['NZFU'].'</a><br/>';
|
|
||||||
//elseif ($etab['GeoInfos']['ZFU']=='NSP') echo 'Implantation en ZFU à vérifier<br/>';
|
|
||||||
if ($etab['GeoInfos']['ZRU']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NZRU'].'" target="_blank">ZRU n°'.$etab['GeoInfos']['NZRU'].'</a><br/>';
|
|
||||||
|
|
||||||
if ($etab['GeoInfos']['ZRR']=='OUI') echo '<a href="http://www.diact.gouv.fr/IMG/Fichiers/Rural%20/ZRR/carte_zrr_20090409.pdf" target="_blank">ZRR n°'.$etab['GeoInfos']['NZRR'].'</a><br/>';
|
|
||||||
if ($etab['GeoInfos']['AFR']=='OUI') echo '<a href="http://www.diact.gouv.fr/IMG/Fichiers/AFR/com_fr_AFR0907.pdf" target="_blank">AFR n°'.$etab['GeoInfos']['NAFR'].'</a><br/>';
|
|
||||||
//elseif ($etab['GeoInfos']['ZRU']=='NSP') echo 'Implantation en ZRU à vérifier<br/>';
|
|
||||||
if ($etab['GeoInfos']['CUCS']=='OUI') echo '<a href="http://sig.ville.gouv.fr/Territoire/'.$etab['GeoInfos']['NCUCS'].'" target="_blank">CUCS n°'.$etab['GeoInfos']['NCUCS'];
|
|
||||||
//elseif ($etab['GeoInfos']['CUCS']=='NSP') echo 'Implantation en CUCS à vérifier';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
//Téléphone
|
//Téléphone
|
||||||
?>
|
$element = formatElement('identite', 'tel', array($etab['Tel'], $etab['Enseigne'], $etab['Nom'], $etab['Adresse'], $etab['CP'], $etab['Ville'] ));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Téléphone</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<div class="txtAdresse">
|
|
||||||
<p>
|
|
||||||
<?php
|
|
||||||
if (trim($etab['Tel'])=='') echo 'N/C';
|
|
||||||
else echo $etab['Tel'];
|
|
||||||
|
|
||||||
if ($etab['Enseigne']<>'') $libNom=urlencode($etab['Enseigne']);
|
|
||||||
else $libNom=urlencode($etab['Nom']);
|
|
||||||
$adresse=$etab['Adresse'];
|
|
||||||
$i_adr=0;
|
|
||||||
while (substr($adresse,0,1)=='0') {
|
|
||||||
$i_adr++;
|
|
||||||
$adresse=substr($adresse,1,strlen($adresse)-1);
|
|
||||||
if ($i_adr>4) break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<a title="Rechercher le numéro de téléphone dans l'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom=<?=$libNom?>&adr=<?=urlencode(utf8_decode($adresse))?>&loc=<?=urlencode(utf8_decode($etab['CP'].' '.$etab['Ville']))?>&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">
|
|
||||||
(Recherche annuaire)</a></p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
//Fax
|
//Fax
|
||||||
if ($etab['Fax']*1>0)
|
$element = formatElement('identite', 'fax', array($etab['Fax']));
|
||||||
{
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Fax</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$etab['Fax']?></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
|
|
||||||
//Site web
|
//Site web
|
||||||
if ($siteWeb<>'') {
|
$element = formatElement('identite', 'web', array($etab['Web']));
|
||||||
?>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Site Internet</td>
|
|
||||||
<td width="350" class="StyleInfoData"><a href="<?=$siteWeb?>" target="_blank"><?=$siteWeb?></a></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
|
|
||||||
//Email
|
//Email
|
||||||
if (trim($etab['Mail'])<>'') { ?>
|
$element = formatElement('identite', 'mail', array($etab['Mail']));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Courriel</td>
|
|
||||||
<td width="350" class="StyleInfoData"><a href="mailto:<?=$etab['Mail'];?>" target="_blank"><?=$etab['Mail']?></a></td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<h2>Activité(s) & Chiffre d'affaire</h2>
|
<h2>Activité(s) & Chiffre d'affaire</h2>
|
||||||
|
<table>
|
||||||
<?php
|
<?php
|
||||||
//Activité de l'entreprise
|
//Activité de l'entreprise
|
||||||
?>
|
$element = formatElement('identite', 'activiteen', array($etab['Activite'], $etab['NafEnt'], $etab['NafEntLib']));
|
||||||
<table>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Activité de l'entreprise</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<?php
|
|
||||||
if ($etab['Activite']<>'' && !preg_match('/non pr(e|é)cis(e|é)/i',utf8_decode($etab['Activite']))) {
|
|
||||||
$texte=preg_replace_callback("/((?:[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, strWsToHtml($etab['Activite']));
|
|
||||||
echo $texte.' ('.$etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']).')';
|
|
||||||
} else
|
|
||||||
echo $etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']);
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//Activité de l'établissement
|
//Activité de l'établissement
|
||||||
?>
|
$element = formatElement('identite', 'activiteet', array($etab['NafEtab'], $etab['NafEtabLib']));
|
||||||
<tr>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Activité de l'établissement</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$etab['NafEtab'].' : '. strWsToHtml($etab['NafEtabLib']);?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
//NAF4
|
//NAF4
|
||||||
if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim(@$etab['Naf4Ent'])<>'') {
|
$element = formatElement('identite', 'naf4', array($etab['Naf4Ent'], $etab['Naf4EntLib'], $etab['Naf4Etab'], $etab['Naf4EtabLib']));
|
||||||
?>
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Anciens codes NAF</td>
|
|
||||||
<td width="350" class="StyleInfoData"><b>Entr. : </b><?=$etab['Naf4Ent'].' - '. strWsToHtml($etab['Naf4EntLib']);?><br/><b>Étab. :</b> <?=$etab['Naf4Etab'].' - '. strWsToHtml($etab['Naf4EtabLib']);?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
//Nature de l'activité
|
//Nature de l'activité
|
||||||
if ($etab['NatureActivite']==1 && $etab['Actif']==1)
|
$element = formatElement('identite', 'natureactivite', array($etab['NatureActivite'], $etab['Actif']));
|
||||||
{
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Nature de l'activité</td>
|
|
||||||
<td width="350" class="StyleInfoData">Saisonnière</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
|
|
||||||
//Origine du fond
|
//Origine du fond
|
||||||
if ( ($etab['OrigineCreation']*1>0 && $etab['OrigineCreation']*1<9) ||
|
$element = formatElement('identite', 'originefond', array($etab['OrigineCreation']));
|
||||||
$etab['OrigineCreation']=='A' || $etab['OrigineCreation']=='B' || $etab['OrigineCreation']=='C' ||
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$etab['OrigineCreation']=='D' || $etab['OrigineCreation']=='E' )
|
|
||||||
{
|
//Type d'exploitation
|
||||||
$tabCreation=array( 'a1'=>'Création',
|
$element = formatElement('identite', 'typeexploitation', array($etab['TypeExploitation']));
|
||||||
'a3'=>'Achat',
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
'a4'=>'Apport',
|
|
||||||
'a6'=>'Prise en location gérance',
|
|
||||||
'a7'=>'Partage',
|
|
||||||
'a8'=>'Reprise',
|
|
||||||
'aA'=>'Reprise globale de l\'exploitation agricole',
|
|
||||||
'aB'=>'Poursuite de l\'exploitation agricole par le conjoint',
|
|
||||||
'aC'=>'Transfert de propriété de l\'exploitation agricole',
|
|
||||||
'aD'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)',
|
|
||||||
'aE'=>'Reprise d\'exploitation agricole individuelle',
|
|
||||||
);
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Origine du fonds</td>
|
|
||||||
<td width="350" class="StyleInfoData"><?=$tabCreation['a'.$etab['OrigineCreation']]?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
//Nombre d'établissements actif
|
//Nombre d'établissements actif
|
||||||
if ($etab['NbEtab']<>'N/C')
|
$element = formatElement('identite', 'nbetabactif', array($etab['NbEtab'], $etab['Siret'], $idEntreprise));
|
||||||
{
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Nombre d'établissements actifs</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<a title="Voir la liste des établissements" href="/?page=etablissements&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>"><?=number_format($etab['NbEtab']*1,null,null,' ')?></a>
|
|
||||||
<?php
|
|
||||||
if ($etab['NbEtab']*1>1)
|
|
||||||
{
|
|
||||||
?> <a title="Voir la liste des établissements" href="/?page=etablissements&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Liste)</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
//Capital
|
//Capital
|
||||||
if (isset($etab['Capital']) && $etab['Capital']*1>0)
|
$element = formatElement('identite', 'capital', array($etab['Capital'], $etab['CapitalDev'], $etab['CapitalLib'], $etab['CapitalType'], $etab['Bilan']));
|
||||||
{
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||||
$title = '';
|
|
||||||
if(isset($etab['Bilan']['Capital'])) $title.='Capital de '.moneyKM($etab['Bilan']['Capital']).deviseText($etab['Bilan']['Devise']);
|
|
||||||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Capital <?php if (isset($etab['CapitalType']) && $etab['CapitalType']=='V'){print 'variable';}?></td>
|
|
||||||
<td width="350" class="StyleInfoData" title="<?=$title?>"><?=number_format($etab['Capital'],0,',',' ')?>
|
|
||||||
<?php
|
|
||||||
if ($etab['CapitalDev']=='EUR') echo '€';
|
|
||||||
else {
|
|
||||||
echo $etab['CapitalDev'].' ('.strWsToHtml($etab['CapitalLib']).')';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Chiffre d'affaire
|
//Chiffre d'affaire
|
||||||
$title = '';
|
$element = formatElement('identite', 'ca', array($etab['Bilan'], $etab['TrancheCALib']));
|
||||||
if(isset($etab['Bilan']['CA'])) $title.='Chiffre d\'affaire de '.moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']);
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||||
if(isset($etab['Bilan']['Resultat'])) $title.=' et Résultat de '.moneyKM($etab['Bilan']['Resultat']).deviseText($etab['Bilan']['Devise']);
|
|
||||||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Chiffre d'affaire</td>
|
|
||||||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
|
||||||
<?php
|
|
||||||
if(isset($etab['Bilan']['CA']) && (!isset($etab['TrancheCALib']) || $etab['TrancheCALib']=='N/C'))
|
|
||||||
{
|
|
||||||
print moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
|
||||||
}elseif(isset($etab['TrancheCALib']) && $etab['TrancheCALib']!='N/C'){
|
|
||||||
print strWsToHtml($etab['TrancheCALib']);
|
|
||||||
}else{
|
|
||||||
print 'N/C';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Principaux dirigeants
|
//Principaux dirigeants
|
||||||
$dir1DateNaiss = '';
|
$element = formatElement('identite', 'dirigeants', array($etab['dir1Titre'], $etab['dir1NomPrenom'], $etab['dir1DateNaiss'], $etab['dir1LieuNaiss'], $etab['dir2Titre'], $etab['dir2NomPrenom'], $etab['dir2DateNaiss'], $etab['dir2LieuNaiss']));
|
||||||
if(isset($etab['dir1DateNaiss']) && $etab['dir1DateNaiss']!='' && $etab['dir1DateNaiss']!='0000-00-00'){
|
if($element!==false){ echo dRow($element['lib'], $element['data']); }
|
||||||
$dir1DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['dir1DateNaiss']));
|
|
||||||
}
|
|
||||||
$dir1LieuNaiss = '';
|
|
||||||
if(isset($etab['dir1LieuNaiss']) && $etab['dir1LieuNaiss']!=''){
|
|
||||||
$dir1LieuNaiss = $etab['dir1LieuNaiss'];
|
|
||||||
}
|
|
||||||
$dir2DateNaiss = '';
|
|
||||||
if(isset($etab['dir2DateNaiss']) && $etab['dir2DateNaiss']!='' && $etab['dir2DateNaiss']!='0000-00-00'){
|
|
||||||
$dir2DateNaiss = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['dir2DateNaiss']));
|
|
||||||
}
|
|
||||||
$dir2LieuNaiss = '';
|
|
||||||
if(isset($etab['dir2LieuNaiss']) && $etab['dir2LieuNaiss']!=''){
|
|
||||||
$dir2LieuNaiss = $etab['dir2LieuNaiss'];
|
|
||||||
}
|
|
||||||
$dir1NaissText = '';
|
|
||||||
if($dir1DateNaiss!='') $dir1NaissText.= 'né(e) le '.$dir1DateNaiss;
|
|
||||||
if($dir1LieuNaiss!='' && $dir1NaissText!='') $dir1NaissText.= ' à '.$dir1LieuNaiss;
|
|
||||||
elseif($dir1LieuNaiss!='' && $dir1NaissText=='') $dir1NaissText.= 'né(e) à '.$dir1LieuNaiss;
|
|
||||||
$dir2NaissText = '';
|
|
||||||
if($dir2DateNaiss!='') $dir2NaissText.= 'né(e) le '.$dir2DateNaiss;
|
|
||||||
if($dir2LieuNaiss!='' && $dir2NaissText!='') $dir2NaissText.= ' à '.$dir2LieuNaiss;
|
|
||||||
elseif($dir2LieuNaiss!='' && $dir2NaissText=='') $dir2NaissText.= 'né(e) à '.$dir2LieuNaiss;
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Principaux Dirigeants</td>
|
|
||||||
<td width="350" class="StyleInfoData">
|
|
||||||
<div class="txtAdresse">
|
|
||||||
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir1Titre'])); ?></b></u><br/><?php print strWsToHtml($etab['dir1NomPrenom']); ?><?php if($dir1NaissText!=''){?>, <?php print $dir1NaissText; }?></p>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
if ($etab['dir2Titre']<>'') {
|
|
||||||
?>
|
|
||||||
<br/>
|
|
||||||
<div class="txtAdresse">
|
|
||||||
<p><u><b><?php print strWsToHtml(ucfirst($etab['dir2Titre'])); ?></b>:</u><br/><?php print strWsToHtml($etab['dir2NomPrenom']); ?> <?php if($dir2NaissText!=''){?>, <?php print $dir2NaissText; }?></p>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Effectif
|
//Effectif
|
||||||
$title = '';
|
$element = formatElement('identite', 'effectif', array($etab['Effectif'], $etab['Bilan']));
|
||||||
if(isset($etab['Bilan']['Effectif'])) $title.=$etab['Bilan']['Effectif'].' salarié(s)';
|
if($element!==false){ echo dRow($element['lib'], $element['data'], $element['title']); }
|
||||||
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib">Effectif de l'entreprise</td>
|
|
||||||
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
|
||||||
<?php
|
|
||||||
if( (!isset($etab['Effectif']) || $etab['Effectif']=='N/C' || $etab['Effectif']==0) && isset($etab['Bilan']['Effectif']))
|
|
||||||
{
|
|
||||||
print $title;
|
|
||||||
}elseif(isset($etab['Effectif']) && $etab['Effectif']!='N/C' && $etab['Effectif']!=0 ){
|
|
||||||
print number_format($etab['Effectif']*1,null,null,' ').' salarié(s)';
|
|
||||||
}else{
|
|
||||||
print 'N/C';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Localisation géographique & Recherche presse</h2>
|
<h2>Localisation géographique & Recherche presse</h2>
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
//Information géographique
|
//Information géographique
|
||||||
function normaliseVoie($voie) {
|
|
||||||
switch (strtoupper($voie)) {
|
|
||||||
case 'BD': case 'BVD': return 'BOULEVARD'; break;
|
|
||||||
case 'AV': case 'AVE': return 'AVENUE'; break;
|
|
||||||
case 'PL': case 'PLA': return 'PLACE'; break;
|
|
||||||
case 'ESP': return 'ESPLANADE'; break;
|
|
||||||
//- 8E__ARRONDISSEMENT
|
|
||||||
default; return strtoupper($voie); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$ville=' '.trim(preg_replace('/([0-9]|BILLANCOURT|SUR.SEINE| PERRET|ARRONDISSEMENT|_)/i',' ',$etab['Ville'])).' ';
|
$ville=' '.trim(preg_replace('/([0-9]|BILLANCOURT|SUR.SEINE| PERRET|ARRONDISSEMENT|_)/i',' ',$etab['Ville'])).' ';
|
||||||
$ville=trim(strtr($ville, array(' EME '=>'', ' ER '=>'')));
|
$ville=trim(strtr($ville, array(' EME '=>'', ' ER '=>'')));
|
||||||
|
|
||||||
@ -859,6 +319,10 @@ if (preg_match('/NEWS/i', $_SESSION['tabInfo']['pref']))
|
|||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'identite-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'identite-'.$siret; }
|
||||||
|
|
||||||
//Exportation des données sous forme de fichier
|
//Exportation des données sous forme de fichier
|
||||||
function htmldecode($value){
|
function htmldecode($value){
|
||||||
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
if (!$_SESSION['connected'])
|
||||||
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||||
|
elseif (!preg_match('/INDISCORE/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité (2)');
|
||||||
|
else {
|
||||||
|
|
||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
@ -12,41 +18,16 @@ function formatPct($pct) {
|
|||||||
return $pct;
|
return $pct;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$_SESSION['connected'])
|
|
||||||
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
|
||||||
elseif (!preg_match('/INDISCORE/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité (2)');
|
|
||||||
else {
|
|
||||||
|
|
||||||
require_once 'cache/cache.php';
|
require_once 'cache/cache.php';
|
||||||
require_once 'partenaires/classMTva.php';
|
require_once 'partenaires/classMTva.php';
|
||||||
require_once 'partenaires/classMMap.php';
|
require_once 'partenaires/classMMap.php';
|
||||||
require_once 'partenaires/classMCoface.php';
|
require_once 'partenaires/classMCoface.php';
|
||||||
require_once 'common/dates.php';
|
require_once 'common/dates.php';
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
|
||||||
$tabInfo = $_SESSION['tabInfo'];
|
$tabInfo = $_SESSION['tabInfo'];
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
|
||||||
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$etab = cache_get('etab');
|
|
||||||
$firephp->info('CACHE');
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
$O = $client->getIndiscore($siren);
|
|
||||||
$etab = $O['result'];
|
|
||||||
$firephp->log($etab, 'etab');
|
|
||||||
cache_delete();
|
|
||||||
cache_add('etab', $etab);
|
|
||||||
} catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$tabInfo);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1 class="titre">INDISCORE©</h1>
|
<h1 class="titre">INDISCORE©</h1>
|
||||||
@ -130,7 +111,7 @@ if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits'])
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="550" colspan="2" class="StyleInfoData">L'évaluation indiScore© c'est en partie basée sur les points notables suivantes :<br/>
|
<td width="550" 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>
|
<h3><u>Conformité légale :</u></h3>
|
||||||
<div class="stats gradiant_pic">
|
<div class="stats gradiant_pic">
|
||||||
<ul>
|
<ul>
|
||||||
|
16
www/pages/international_commandes.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
|
$q = Doctrine_Query::create()
|
||||||
|
->from('Report')
|
||||||
|
->where('user = ?', $_SESSION['tabInfo']['login']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div id="center">
|
||||||
|
<h1>Commandes Internationales</h1>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
@ -4,8 +4,8 @@ if (!$_SESSION['connected']) die();
|
|||||||
$tabInfo=$_SESSION['tabInfo'];
|
$tabInfo=$_SESSION['tabInfo'];
|
||||||
$pays = $_SESSION['graydon']['pays'];
|
$pays = $_SESSION['graydon']['pays'];
|
||||||
$paysCode = $_SESSION['graydon']['paysCode'];
|
$paysCode = $_SESSION['graydon']['paysCode'];
|
||||||
$firephp->log($pays, 'pays');
|
|
||||||
$mode = $_SESSION['graydon']['mode'];
|
$mode = $_SESSION['graydon']['mode'];
|
||||||
|
$firephp->log($pays, 'pays');
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
require_once 'dbbootstrap.php';
|
require_once 'dbbootstrap.php';
|
||||||
@ -22,11 +22,12 @@ $pays = $country->graydon_country;
|
|||||||
if(isset($_REQUEST['submit'])){
|
if(isset($_REQUEST['submit'])){
|
||||||
$firephp->log('Soumission formulaire');
|
$firephp->log('Soumission formulaire');
|
||||||
//Enregistrement du formulaire
|
//Enregistrement du formulaire
|
||||||
/*print '<pre>';
|
/*
|
||||||
|
print '<pre>';
|
||||||
print_r($_REQUEST['InfoUser']);
|
print_r($_REQUEST['InfoUser']);
|
||||||
print_r($_REQUEST['InfoEnq']);
|
print_r($_REQUEST['InfoEnq']);
|
||||||
print '</pre>';*/
|
print '</pre>';
|
||||||
|
*/
|
||||||
//Vérification des informations
|
//Vérification des informations
|
||||||
$formError = FALSE;
|
$formError = FALSE;
|
||||||
$fields = array();
|
$fields = array();
|
||||||
@ -50,7 +51,24 @@ $firephp->log('Soumission formulaire');
|
|||||||
$message.= '</font>';
|
$message.= '</font>';
|
||||||
}else{
|
}else{
|
||||||
$commandeOk = setEnquete($pays);
|
$commandeOk = setEnquete($pays);
|
||||||
}//Fin Erreur formulaire
|
require_once 'phpmailer/class.phpmailer.php';
|
||||||
|
$mail = new PHPMailer();
|
||||||
|
$mail->From = "contact@scores-decisions.com";
|
||||||
|
$mail->FromName = "Serveur SD-13408";
|
||||||
|
$mail->Host = "mail.scores-decisions.com";
|
||||||
|
$mail->Mailer = "smtp";
|
||||||
|
$mail->Subject = "DEBUG - Commandes de rapport graydon";
|
||||||
|
$body = "Commandes\n";
|
||||||
|
$body .= "Utilisateur :\n";
|
||||||
|
$body .= print_r($REQUEST['InfoUser']);
|
||||||
|
$body .= "\n";
|
||||||
|
$body .= "Enquêtes : \n";
|
||||||
|
$body .= print_r($REQUEST['InfoEnq']);
|
||||||
|
$body .= "\n";
|
||||||
|
$mail->MsgHTML($body);
|
||||||
|
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
||||||
|
$mail->Send();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
@ -121,40 +139,20 @@ if(isset($commandeOk) && is_numeric($commandeOk)){ $message = '<font color="red"
|
|||||||
<h2>Entreprise concernée : </h2>
|
<h2>Entreprise concernée : </h2>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(isset($_REQUEST['pidentifier'])){
|
$Companyproducts = getCompanyProducts($_REQUEST['identifier']);
|
||||||
setDbConn('graydon');
|
$company = $Companyproducts['Company'];
|
||||||
$q = Doctrine_Query::create()
|
$products = $Companyproducts['Products'];
|
||||||
->from('Companyproducts')
|
|
||||||
->where('identifiers = ?', $identifier);
|
|
||||||
|
|
||||||
$companyproducts = new Companyproducts();
|
if($company->Name!=''){ $name = $company->Name; }else{ $name = $_SESSION['graydon']['name']; }
|
||||||
$companyproducts = $q->fetchOne();
|
|
||||||
$company = unserialize($companyproducts->company);
|
|
||||||
$products = unserialize($companyproducts->products);
|
|
||||||
$products = $products->Product;
|
|
||||||
|
|
||||||
$count = count($company->CompanyIdentifiers->CompanyIdentifier);
|
if(isset($_REQUEST['pidentifier']))
|
||||||
if ($count>1){
|
{
|
||||||
$identifiers = $company->CompanyIdentifiers->CompanyIdentifier;
|
|
||||||
}elseif($count==1){
|
|
||||||
$identifiers[] = $company->CompanyIdentifiers->CompanyIdentifier;
|
|
||||||
}
|
|
||||||
foreach($identifiers as $identifier){
|
|
||||||
if($identifier->Type != 'Internal'){
|
|
||||||
?>
|
|
||||||
<div class="fieldgrp">
|
|
||||||
<input type="hidden" name="pidentifier" value="<?php print $_REQUEST['pidentifier']; ?>" />
|
|
||||||
<input type="hidden" name="method" value="identifier" />
|
|
||||||
<label><?php print $identifier->Description ?></label>
|
|
||||||
<span><?php print $identifier->Identifier;?></span>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
<input type="hidden" name="pidentifier" value="<?=$_REQUEST['pidentifier']?>" />
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php print $company->Name;?>" readonly="readonly"/></div>
|
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_REQUEST['InfoEnq']['Name'])){ print $_REQUEST['InfoEnq']['Name'];}else{ print $name;} ?>" readonly="readonly"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
@ -174,12 +172,14 @@ if(isset($_REQUEST['pidentifier'])){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">Raison Sociale :</label>
|
<label class="StyleInfoLib">Raison Sociale :</label>
|
||||||
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_REQUEST['InfoEnq']['Name'])){ print $_REQUEST['InfoEnq']['Name'];} ?>"/></div>
|
<div class="field"><input type="text" name="InfoEnq[Name]" value="<?php if (isset($_REQUEST['InfoEnq']['Name'])){ print $_REQUEST['InfoEnq']['Name'];}else{ print $name;} ?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -198,7 +198,7 @@ if(is_array($identifiers)){
|
|||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<input type="hidden" name="method" value="identifier" />
|
<input type="hidden" name="method" value="identifier" />
|
||||||
<label><?php print $identifier->Description ?></label>
|
<label><?php print $identifier->Description ?></label>
|
||||||
<input type="text" name="InfoEnq[Identifier][<?php print $identifier->Type ?>]" value="<?php if (isset($_REQUEST['InfoEnq']['Identifier'][$identifier->Type])){ print $_REQUEST['InfoEnq']['Identifier'][$identifier->Type];} ?>" />
|
<input type="text" name="InfoEnq[Identifier][<?=$identifier->Type?>]" value="<?php if (isset($_REQUEST['InfoEnq']['Identifier'][$identifier->Type])){ print $_REQUEST['InfoEnq']['Identifier'][$identifier->Type];} ?>" />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$count++;
|
$count++;
|
||||||
@ -270,7 +270,7 @@ if(is_array($identifiers)){
|
|||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
|
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
|
||||||
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php if(isset($_REQUEST['InfoUser']['Email'])){print $_REQUEST['InfoUser']['Email'];}else{ print $user['mail']; }?>"/></div>
|
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php if(isset($_REQUEST['InfoUser']['Email'])){print $_REQUEST['InfoUser']['Email'];}else{ print $user['email']; }?>"/></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="fieldgrp">
|
||||||
@ -305,10 +305,16 @@ $serviceNom = array('Normal', 'Rapide');
|
|||||||
foreach($availability as $item){
|
foreach($availability as $item){
|
||||||
if(in_array($item->ServiceSpeed, $serviceActif)==TRUE){
|
if(in_array($item->ServiceSpeed, $serviceActif)==TRUE){
|
||||||
$key = array_search($item->ServiceSpeed, $serviceActif);
|
$key = array_search($item->ServiceSpeed, $serviceActif);
|
||||||
?>
|
$speed = $_REQUEST['speed'];
|
||||||
<input type="radio" name="InfoEnq[Servicespeed]" value="<?php print $item->ServiceSpeed;?>" <?php if(isset($_REQUEST['InfoEnq']['Servicespeed']) && $_REQUEST['InfoEnq']['Servicespeed']==$item->ServiceSpeed){print 'selected="selected"';}?>>
|
$firephp->log($speed,'speed');
|
||||||
<?php print $serviceNom[$key];?> (Tarif : <?php print $results[0][strtolower($item->ServiceSpeed)]; ?> €, Délai :<?php print $item->DaysFrom.' à '.$item->DaysTo.' jours';?>)
|
$firephp->log($item->ServiceSpeed,'ServiceSpeed');
|
||||||
<br/>
|
$select = '';
|
||||||
|
if( (isset($_REQUEST['InfoEnq']['Servicespeed']) && $_REQUEST['InfoEnq']['Servicespeed']==$item->ServiceSpeed)
|
||||||
|
|| ucfirst($speed)==$item->ServiceSpeed ) { $select = 'checked';}
|
||||||
|
?>
|
||||||
|
<input type="radio" name="InfoEnq[Servicespeed]" value="<?=$item->ServiceSpeed?>" <?=$select?>>
|
||||||
|
<?php print $serviceNom[$key];?> (Tarif : <?php print $results[0][strtolower($item->ServiceSpeed)]; ?> €, Délai :<?php print $item->DaysFrom.' à '.$item->DaysTo.' jours';?>)
|
||||||
|
<br/>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ if($_REQUEST['submit']){
|
|||||||
|
|
||||||
//@TODO : Réception du code pays
|
//@TODO : Réception du code pays
|
||||||
$pays = $_SESSION['graydon']['pays'];
|
$pays = $_SESSION['graydon']['pays'];
|
||||||
$pays = 'Algeria';
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$O = $client->getInfosLogin($tabInfo['login']);
|
$O = $client->getInfosLogin($tabInfo['login']);
|
||||||
|
@ -8,9 +8,7 @@ $pays = $_SESSION['graydon']['pays'];
|
|||||||
$mode = $_SESSION['graydon']['mode'];
|
$mode = $_SESSION['graydon']['mode'];
|
||||||
|
|
||||||
require_once 'i18n/cleanchar.php';
|
require_once 'i18n/cleanchar.php';
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydon.php';
|
||||||
require_once 'graydon/pays.php';
|
|
||||||
require_once 'graydon/graydon_log.php';
|
|
||||||
require_once 'dbbootstrap.php';
|
require_once 'dbbootstrap.php';
|
||||||
|
|
||||||
$tabIdentifiers = getCompanyMatchIdentifiers($pays);
|
$tabIdentifiers = getCompanyMatchIdentifiers($pays);
|
||||||
@ -21,7 +19,8 @@ $Companyproducts = getCompanyProducts($identifier);
|
|||||||
$company = $Companyproducts['Company'];
|
$company = $Companyproducts['Company'];
|
||||||
$products = $Companyproducts['Products'];
|
$products = $Companyproducts['Products'];
|
||||||
|
|
||||||
if(isset($company)){
|
if(isset($company))
|
||||||
|
{
|
||||||
$firephp->log($products,'products');
|
$firephp->log($products,'products');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -34,35 +33,34 @@ if(isset($company)){
|
|||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php $noReport = TRUE; ?>
|
||||||
$count = count($products);
|
|
||||||
if($count==1){
|
|
||||||
$products[] = $products;
|
|
||||||
}
|
|
||||||
$noReport = TRUE;
|
|
||||||
?>
|
|
||||||
<u><b>Accès à la fiche identité approfondie :</b></u>
|
<u><b>Accès à la fiche identité approfondie :</b></u>
|
||||||
<?php
|
<?php
|
||||||
$tabReport = array();
|
$tabReport = array();
|
||||||
$tabProductIdentifier = array();
|
$tabProductIdentifier = array();
|
||||||
$countProducts = 0;
|
$countProducts = 0;
|
||||||
foreach($products as $product){
|
foreach($products as $product)
|
||||||
|
{
|
||||||
//Rapport en mode normal
|
//Rapport en mode normal
|
||||||
if ($product->ServiceSpeed == 'Normal' && $product->Type == 'Investigation' && $product->Level == 4 ){
|
if ($product->ServiceSpeed == 'Normal' && $product->Type == 'Investigation' && $product->Level == 4 )
|
||||||
|
{
|
||||||
$tabReport[$countProducts] = 'Normal';
|
$tabReport[$countProducts] = 'Normal';
|
||||||
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
||||||
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
||||||
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
||||||
$countProducts++;
|
$countProducts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rapport en mode Superflash
|
//Rapport en mode Superflash
|
||||||
if ($product->ServiceSpeed == 'Superflash' && $product->Type == 'Investigation' && $product->Level == 4 ){
|
if ($product->ServiceSpeed == 'Superflash' && $product->Type == 'Investigation' && $product->Level == 4 )
|
||||||
|
{
|
||||||
$tabReport[] = 'Superflash';
|
$tabReport[] = 'Superflash';
|
||||||
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
||||||
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
|
||||||
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
|
||||||
$countProducts++;
|
$countProducts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rapport disponible avec mise à jour
|
//Rapport disponible avec mise à jour
|
||||||
if ($product->ServiceSpeed == 'ImmediateWithUpdate' && $product->Type == 'Database' && $product->Level == 3 ){
|
if ($product->ServiceSpeed == 'ImmediateWithUpdate' && $product->Type == 'Database' && $product->Level == 3 ){
|
||||||
require_once 'phpmailer/class.phpmailer.php';
|
require_once 'phpmailer/class.phpmailer.php';
|
||||||
@ -94,30 +92,25 @@ if(isset($company)){
|
|||||||
$countProducts++;
|
$countProducts++;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
//Rapport disponible en ligne
|
//Rapport disponible en ligne
|
||||||
if ($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database' && $product->Level == 3 ){
|
if ($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database' && $product->Level == 3 )
|
||||||
|
{
|
||||||
$mimetype = FALSE;
|
$mimetype = FALSE;
|
||||||
if (is_array($product->MimeTypes->MimeType)){
|
|
||||||
if (in_array('xml', $product->MimeTypes->MimeType)){$mimetype = TRUE;}
|
if (!is_array($product->MimeTypes->MimeType)){ $productMimeTypes = array($product->MimeTypes->MimeType); }
|
||||||
else {
|
else{ $productMimeTypes = $product->MimeTypes->MimeType; }
|
||||||
require_once 'phpmailer/class.phpmailer.php';
|
|
||||||
$mail = new PHPMailer();
|
foreach( reportFormat() as $format )
|
||||||
$mail->From = "contact@scores-decisions.com";
|
{
|
||||||
$mail->FromName = "Serveur SD-13408";
|
if (in_array($format, $product->MimeTypes->MimeType))
|
||||||
$mail->Host = "mail.scores-decisions.com";
|
{
|
||||||
$mail->Mailer = "smtp";
|
$mimetype = TRUE;
|
||||||
$mail->Subject = "Rapport International";
|
break;
|
||||||
$body = "Rapport international disponible dans un autre format que le XML\n";
|
|
||||||
$body .= "Identifiant : ".$identifier."";
|
|
||||||
$mail->MsgHTML($body);
|
|
||||||
$mail->AddAddress(EMAIL_SUPPORTDEV, "Support");
|
|
||||||
$mail->Send();
|
|
||||||
}
|
}
|
||||||
}else{
|
else
|
||||||
if ($product->MimeTypes->MimeType == 'xml' ){$mimetype = TRUE;}
|
{
|
||||||
else {
|
|
||||||
require_once 'phpmailer/class.phpmailer.php';
|
require_once 'phpmailer/class.phpmailer.php';
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
$mail->From = "contact@scores-decisions.com";
|
$mail->From = "contact@scores-decisions.com";
|
||||||
@ -132,21 +125,26 @@ if(isset($company)){
|
|||||||
$mail->Send();
|
$mail->Send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($mimetype == TRUE ){
|
if ($mimetype == TRUE )
|
||||||
|
{
|
||||||
$tabReport[] = 'Immediate';
|
$tabReport[] = 'Immediate';
|
||||||
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
|
||||||
|
$tabProducts[$countProducts]['format'] = $format;
|
||||||
$countProducts++;
|
$countProducts++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // Fin boucle d'affichage des produits
|
||||||
|
|
||||||
$firephp->log($tabProducts,'tabProducts');
|
$firephp->log($tabProducts,'tabProducts');
|
||||||
|
|
||||||
if(count($tabReport)==0){
|
if(count($tabReport)==0)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
(Aucun rapport disponible pour cette société)
|
(Aucun rapport disponible pour cette société)
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//Récupération des tarifs propre au pays
|
//Récupération des tarifs propre au pays
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
$q = Doctrine_Query::create($conn)
|
$q = Doctrine_Query::create($conn)
|
||||||
@ -157,45 +155,87 @@ if(isset($company)){
|
|||||||
$tabPaysPrix = $q->fetchArray();
|
$tabPaysPrix = $q->fetchArray();
|
||||||
$firephp->log($tabPaysPrix, 'tableau');
|
$firephp->log($tabPaysPrix, 'tableau');
|
||||||
|
|
||||||
if(in_array('Normal',$tabReport)){
|
$href = array();
|
||||||
|
if(in_array('Normal',$tabReport))
|
||||||
|
{
|
||||||
$key = array_search('Normal', $tabReport);
|
$key = array_search('Normal', $tabReport);
|
||||||
$pidentifier = $tabProducts[$key]['identifier'];
|
$pidentifier = $tabProducts[$key]['identifier'];
|
||||||
$daysFrom = $tabProducts[$key]['DaysFrom'];
|
$daysFrom = $tabProducts[$key]['DaysFrom'];
|
||||||
$daysTo = $tabProducts[$key]['DaysTo'];
|
$daysTo = $tabProducts[$key]['DaysTo'];
|
||||||
//Vérification des droits
|
//Vérification des droits
|
||||||
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
||||||
//print '<br/><br/><a href="./?page=international_enquete&identifier='.$identifier.'&pidentifier='.$pidentifier.'">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
$href['normal'] = './?page=international_enquete&speed=normal&identifier='.$identifier.'&pidentifier='.$pidentifier;
|
||||||
print '<br/><br/><a href="#">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
|
||||||
}else{
|
}else{
|
||||||
|
$href['normal'] = '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isset($href['normal']))
|
||||||
|
{
|
||||||
|
if($href['normal']=='#'){
|
||||||
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
|
}else{
|
||||||
|
print '<br/><br/><a href="'.$href['normal'].'">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
|
//print '<br/><br/><a href="#" title="Fonctionnalités désactivées">Commander le rapport en mode normal</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br/><br/><a href="#" title="Type de commande indisponible">Rapport en mode normal indisponible</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
//Affichage des différents rapports dans l'ordre
|
//Affichage des différents rapports dans l'ordre
|
||||||
if(in_array('Superflash',$tabReport)){
|
if(in_array('Superflash',$tabReport))
|
||||||
|
{
|
||||||
$key = array_search('Superflash', $tabReport);
|
$key = array_search('Superflash', $tabReport);
|
||||||
$pidentifier = $tabProducts[$key]['identifier'];
|
$pidentifier = $tabProducts[$key]['identifier'];
|
||||||
$daysFrom = $tabProducts[$key]['DaysFrom'];
|
$daysFrom = $tabProducts[$key]['DaysFrom'];
|
||||||
$daysTo = $tabProducts[$key]['DaysTo'];
|
$daysTo = $tabProducts[$key]['DaysTo'];
|
||||||
//Vérification des droits
|
//Vérification des droits
|
||||||
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
||||||
//print '<br/><br/><a href="./?page=international_enquete&identifier='.$identifier.'&pidentifier='.$pidentifier.'">Commander le rapport en mode rapide</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['superflash'].' €)</i>';
|
$href['superflash'] = './?page=international_enquete&speed=superflash&identifier='.$identifier.'&pidentifier='.$pidentifier;
|
||||||
print '<br/><br/><a href="#">Commander le rapport en mode rapide</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['superflash'].' €)</i>';
|
|
||||||
}else{
|
}else{
|
||||||
|
$href['superflash'] = '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isset($href['superflash']))
|
||||||
|
{
|
||||||
|
if($href['normal']=='#'){
|
||||||
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Commander le rapport en mode rapide</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['superflash'].' €)</i>';
|
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Commander le rapport en mode rapide</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['superflash'].' €)</i>';
|
||||||
|
}else{
|
||||||
|
print '<br/><br/><a href="'.$href['superflash'].'">Commander le rapport en mode rapide</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['superflash'].' €)</i>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(in_array('Immediate',$tabReport)){
|
else
|
||||||
|
{
|
||||||
|
print '<br/><br/><a href="#" title="Type de commande indisponible">Rapport immédiat indisponible</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(in_array('Immediate',$tabReport))
|
||||||
|
{
|
||||||
$key = array_search('Immediate', $tabReport);
|
$key = array_search('Immediate', $tabReport);
|
||||||
$pidentifier = $tabProducts[$key]['identifier'];
|
$pidentifier = $tabProducts[$key]['identifier'];
|
||||||
|
isset($tabProducts[$key]['format'])? $format = $tabProducts[$key]['format'] : $format = '';
|
||||||
//Vérification des droits
|
//Vérification des droits
|
||||||
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
if(preg_match('/international/i', $_SESSION['tabInfo']['droits'])){
|
||||||
print '<br/><br/><a href="./?page=international_identitec&identifier='.$identifier.'&pidentifier='.$pidentifier.'">Consutler le rapport disponible</a><br/><i>(Délais : Immédiat, Tarif : '.$tabPaysPrix[0]['immediate'].' €)</i>';
|
$href['immediate'] = './?page=international_identitec&identifier='.$identifier.'&pidentifier='.$pidentifier;
|
||||||
|
if( !empty($format) ) { $href['immediate'].= '&format=xml'; }
|
||||||
}else{
|
}else{
|
||||||
|
$href['immediate'] = '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isset($href['immediate']))
|
||||||
|
{
|
||||||
|
if($href['immediate']=='#'){
|
||||||
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Consutler le rapport disponible</a><br/><i>(Délais : Immédiat, Tarif : '.$tabPaysPrix[0]['immediate'].' €)</i>';
|
print '<br/><br/><a href="#" title="Vous n\'avez pas les droits nécessaires pour commander un rapport international">Consutler le rapport disponible</a><br/><i>(Délais : Immédiat, Tarif : '.$tabPaysPrix[0]['immediate'].' €)</i>';
|
||||||
|
}else{
|
||||||
|
print '<br/><br/><a href="'.$href['immediate'].'">Consutler le rapport disponible</a><br/><i>(Délais : Immédiat, Tarif : '.$tabPaysPrix[0]['immediate'].' €)</i>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br/><br/><a href="#" title="Type de commande indisponible">Rapport immédiat indisponible</a><br/><i>(Délais : '.$daysFrom.' à '.$daysTo.' Jours, Tarif : '.$tabPaysPrix[0]['normal'].' €)</i>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -204,12 +244,7 @@ if(isset($company)){
|
|||||||
<td colspan="3"> </td>
|
<td colspan="3"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$count = count($company->CompanyIdentifiers->CompanyIdentifier);
|
|
||||||
if ($count>1){
|
|
||||||
$identifiers = $company->CompanyIdentifiers->CompanyIdentifier;
|
$identifiers = $company->CompanyIdentifiers->CompanyIdentifier;
|
||||||
}elseif($count==1){
|
|
||||||
$identifiers[] = $company->CompanyIdentifiers->CompanyIdentifier;
|
|
||||||
}
|
|
||||||
foreach($identifiers as $identifier){
|
foreach($identifiers as $identifier){
|
||||||
if($identifier->Type != 'Internal'){
|
if($identifier->Type != 'Internal'){
|
||||||
?>
|
?>
|
||||||
@ -233,7 +268,7 @@ if(isset($company)){
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php print "1".$identifier->Identifier; ?></td>
|
<?php print $identifier->Identifier; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"> </td>
|
<td colspan="3"> </td>
|
||||||
@ -247,27 +282,31 @@ if(isset($company)){
|
|||||||
<h2>Raison sociale et coordonnées : </h2>
|
<h2>Raison sociale et coordonnées : </h2>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
<tr>
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php
|
<?php
|
||||||
$_SESSION['graydon']['name'] = $company->Name;
|
if($company->Name!=''){
|
||||||
print cleanutf8($company->Name);
|
$name = $company->Name;
|
||||||
|
}else{
|
||||||
|
$name = $_REQUEST['name'];
|
||||||
|
}
|
||||||
|
$_SESSION['graydon']['name'] = $name;
|
||||||
|
print cleanutf8($name);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Adresse Complète</td>
|
<td width="200" class="StyleInfoLib">Adresse Complète</td>
|
||||||
<td width="350" class="StyleInfoData"><?php print cleanutf8($company->RegisteredAddress->EntireAddress); ?></td>
|
<td width="350" class="StyleInfoData"><?=cleanutf8($company->RegisteredAddress->EntireAddress); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Adresse</td>
|
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||||
<td width="350" class="StyleInfoData"><?php print cleanutf8($company->RegisteredAddress->Building.', '.$company->RegisteredAddress->Street); ?></td>
|
<td width="350" class="StyleInfoData"><?=cleanutf8($company->RegisteredAddress->Building.', '.$company->RegisteredAddress->Street); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -310,14 +349,10 @@ if(isset($company)){
|
|||||||
|
|
||||||
<table>
|
<table>
|
||||||
<?php
|
<?php
|
||||||
$count = count($company->Activites->Activity);
|
if (count($company->Activites)>0)
|
||||||
if ($count>1){
|
{
|
||||||
$activites = $company->Activites->Activity;
|
foreach($company->Activites as $activity)
|
||||||
}elseif($count==1){
|
{
|
||||||
$activites[] = $company->Activites->Activity;
|
|
||||||
}
|
|
||||||
if ($count>0){
|
|
||||||
foreach($activites as $activity){
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
|
@ -5,12 +5,16 @@ $tabInfo = $_SESSION['tabInfo'];
|
|||||||
|
|
||||||
$identifier = $_REQUEST['identifier'];
|
$identifier = $_REQUEST['identifier'];
|
||||||
$CompanyProductIdentifier = $_REQUEST['pidentifier'];
|
$CompanyProductIdentifier = $_REQUEST['pidentifier'];
|
||||||
|
isset($_REQUEST['format']) ? $format = $_REQUEST['format'] : $format = 'xml';
|
||||||
|
|
||||||
|
$firephp->log($identifier, 'identifier');
|
||||||
|
$firephp->log($CompanyProductIdentifier, 'CompanyProductIdentifier');
|
||||||
|
|
||||||
$pays = $_SESSION['graydon']['pays'];
|
$pays = $_SESSION['graydon']['pays'];
|
||||||
$mode = $_SESSION['graydon']['mode'];
|
$mode = $_SESSION['graydon']['mode'];
|
||||||
|
|
||||||
require_once 'i18n/cleanchar.php';
|
require_once 'i18n/cleanchar.php';
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydon.php';
|
||||||
require_once 'graydon/graydon_log.php';
|
|
||||||
require_once 'dbbootstrap.php';
|
require_once 'dbbootstrap.php';
|
||||||
|
|
||||||
function dVal($value){
|
function dVal($value){
|
||||||
@ -23,19 +27,169 @@ function dVal($value){
|
|||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$firephp->info('Fomat HTML');
|
||||||
|
|
||||||
$path = PATH_DATA.'/graydon';
|
$path = PATH_DATA.'/graydon';
|
||||||
$fileName = strtolower(str_replace( array(':',' '), '-', $identifier).'.xml');
|
$fileName = strtolower(str_replace( array(':',' '), '-', $identifier).'.'.$format);
|
||||||
|
|
||||||
//Vérifier si le rapport n'est pas disponible en base depuis une autre commandes
|
//Vérifier si le rapport n'est pas disponible en base depuis une autre commandes
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
$q = Doctrine_Query::create()
|
$q = Doctrine_Query::create()
|
||||||
->from('Report')
|
->from('Report')
|
||||||
->where('identifier = ?', $_REQUEST['identifier']);
|
->where('identifier = ?', $_REQUEST['identifier'])
|
||||||
|
->andWhere('format = ?', $format);
|
||||||
|
|
||||||
|
$firephp->log($q->getSql(), 'Requete SQL');
|
||||||
|
$firephp->log($q->getParams(), 'Params SQL');
|
||||||
|
|
||||||
$report = new Report();
|
$report = new Report();
|
||||||
$report = $q->fetchOne();
|
$report = $q->fetchOne();
|
||||||
|
|
||||||
//@TODO : si le rapport existe déjà ou que la date n'est pas très éloigné
|
if($format == 'html')
|
||||||
if($report==FALSE){
|
{
|
||||||
|
|
||||||
|
|
||||||
|
//@TODO : si le rapport existe déjà ou que la date n'est pas très éloigné
|
||||||
|
if($report==FALSE)
|
||||||
|
{
|
||||||
|
$firephp->info('Pas en cache');
|
||||||
|
//Vérifier si le rapport en ligne à déjà été demandé
|
||||||
|
/*
|
||||||
|
$q = Doctrine_Query::create()
|
||||||
|
->from('Commandes')
|
||||||
|
->where('companyproductidentifier = ?', $CompanyProductIdentifier);
|
||||||
|
|
||||||
|
$commandes = new Commandes();
|
||||||
|
$commandes = $q->fetchOne();
|
||||||
|
|
||||||
|
$report = new Report();
|
||||||
|
$report = $commandes->Report;
|
||||||
|
|
||||||
|
if($commandes == FALSE && !isset($report->id)){
|
||||||
|
$html = getIdentite($identifier, $CompanyProductIdentifier, $path.'/'.$fileName, $format);
|
||||||
|
//La commande à déjà été demandé
|
||||||
|
}else{
|
||||||
|
$html = $report->content;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
$html = getIdentite($identifier, $CompanyProductIdentifier, $path.'/'.$fileName, $format);
|
||||||
|
//Le rapport est disponible
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$country = Doctrine_Query::create()
|
||||||
|
->from('Country')
|
||||||
|
->where('graydon_country = ?', $pays)
|
||||||
|
->fetchOne();
|
||||||
|
|
||||||
|
//Enregistrement d'une fausse commande dans la bdd
|
||||||
|
$commandes = new Commandes();
|
||||||
|
$commandes->reference = $placeOrderResult->OrderStatus->OrderReference;
|
||||||
|
$commandes->servicespeed = $placeOrderResult->OrderStatus->Order->ServiceSpeed;
|
||||||
|
$commandes->prix = 0;
|
||||||
|
$commandes->orderstate = $placeOrderResult->OrderStatus->OrderState;
|
||||||
|
$commandes->dateordered = $placeOrderResult->OrderStatus->DateOrdered;
|
||||||
|
$commandes->datecompleted = $placeOrderResult->OrderStatus->DateCompleted;
|
||||||
|
$commandes->datedue = $placeOrderResult->OrderStatus->DateDue;
|
||||||
|
$commandes->companyproductidentifier = $CompanyProductIdentifier;
|
||||||
|
$commandes->sessionid = $sessionID;
|
||||||
|
$commandes->transactionidentifier = $transactionIdentifier;
|
||||||
|
$commandes->user = $tabInfo['login'];
|
||||||
|
$commandes->mode = $_SESSION['graydon']['mode'];
|
||||||
|
$commandes->Country = $country;
|
||||||
|
$commandes->save();
|
||||||
|
$firephp->log($commandes->toArray(),'dataCommandes');
|
||||||
|
$commandes_id = $commandes->id;
|
||||||
|
|
||||||
|
//Assignation du contenu
|
||||||
|
$html = $report->content;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($html) && $html!='' && $html!==FALSE)
|
||||||
|
{
|
||||||
|
$html = str_replace('<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">', '', $html);
|
||||||
|
$html = str_replace('<body>', '', $html);
|
||||||
|
$html = str_replace('</body></html>', '', $html);
|
||||||
|
$html = preg_replace('@<style[^>]*?>.*?</style>@si', '', $html);
|
||||||
|
$html = preg_replace('@<h1[^>]*?>Graydon .*?</h1>@si', '', $html);
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
h1{font-family : Verdana, Arial, Helvetica, sans-serif;font-size: 14px;font-weight : bold;color : white;padding: 3px;margin: 10px 0px 6px 0px;border-width : 1px;border-style : solid;border-color : #31659C;background-color : #31659C; text-align: left;}
|
||||||
|
h1.header{font-size: 18px;font-weight : 900;border-width : 0px;text-align: center;color : #31659C;background-color : white;}
|
||||||
|
h1.trailer{border-width : 0px;text-align: center;color : #31659C;background-color : white;}
|
||||||
|
img{border-style : none;align: left;vertical-align: middle;}
|
||||||
|
img.link{height: 11px;width: 13px}
|
||||||
|
p{font-size: 13px;font-family: Verdana, Arial, Helvetica, sans-serif;margin : 0px;padding-left : 3px;padding-right : 3px;padding-top : 3px;padding-bottom : 3px;text-align: left;}
|
||||||
|
p.smallSpace{font-size: 1px;}
|
||||||
|
table{}
|
||||||
|
table.border{border-style : solid;border-width : 1px;border-color: #31659C;}
|
||||||
|
table.header{margin: 10px 0px 6px 0px;border-width : 1px;border-style : solid;border-color : #31659C;text-align: left; width:100%;}
|
||||||
|
table.small{width: 300px;}
|
||||||
|
tr{page-break-inside: avoid;}
|
||||||
|
th{font-family : Verdana, Arial, Helvetica, sans-serif;font-weight: bold;font-size: 13px;padding-left: 3px;width: 177px;color: #31659C;background-color : #e7eff8;text-align: left;vertical-align: top;}
|
||||||
|
th.h1{font-size: 14px;padding: 3px;font-weight : bold;background-color : #31659C;color : white;}
|
||||||
|
th.minusBackgroundColor{background-color : white;}
|
||||||
|
th.label{font-weight: normal;background-color : white;width: auto;}
|
||||||
|
th.indent{padding-left: 6px;}
|
||||||
|
th.indentDouble{padding-left: 12px;}
|
||||||
|
td{font-size: 13px;font-family: Verdana, Arial, Helvetica, sans-serif;color: black;padding-left: 3px;vertical-align: top;text-align: left;}
|
||||||
|
a{font-family: Verdana, Arial, Helvetica, sans-serif;text-decoration : underline;color : blue;vertical-align: middle;}
|
||||||
|
a:HOVER{font-family: Verdana, Arial, Helvetica, sans-serif;color : gold;vertical-align: middle;}
|
||||||
|
input{font-size : 13px;font-family : Verdana,Arial;font-weight : lighter;border-width : 1px 1px 1px 1px;border-top-style : solid;border-left-style: solid;border-right-style : solid;border-bottom-style : solid;}
|
||||||
|
select{font-size : 7pt;font-family : "Small Fonts",Arial;border-top-width : 1px;border-left-width : 1px;border-right-width : 1px;border-bottom-width : 1px;border-top-style : solid;border-left-style : solid;border-right-style : solid;border-bottom-style : solid;border-color : black black black black;font-weight : lighter;background-color : #f1f1f1;}
|
||||||
|
.submit{font-size : 14px;font-family : Verdana,Arial;font-weight : normal;color : #f1f1f1;background-color : black;}
|
||||||
|
.bold{font-weight: bold;}
|
||||||
|
.red{color: red;}
|
||||||
|
.white{background-color: white;}
|
||||||
|
.lightGrey{background-color: lightGrey;}.italic{font-style: italic;}.dashed{border-bottom-style : dashed;border-bottom-width : 1px;border-bottom-color: silver;padding-left: 3px;padding-right: 3px;margin-top: 3px;margin-bottom: 3px;}
|
||||||
|
.marginTop{margin-top: 6px;}
|
||||||
|
.paddingTop{padding-top: 3px;}
|
||||||
|
.paddingBottom{padding-bottom: 6px;}
|
||||||
|
.textAlignRight{text-align: right;padding-right: 3px;}
|
||||||
|
.signature_color1{color: #31659C;}
|
||||||
|
.border_right{border-right-style : solid;border-right-width : 1px;border-right-color: #31659C;}
|
||||||
|
.border_left{border-right-style : solid;border-right-width : 1px;border-right-color: #31659C;}
|
||||||
|
.border_bottom{border-bottom-style : solid;border-bottom-width : 1px;border-bottom-color: #31659C;}
|
||||||
|
.center{text-align: center;width: auto;}
|
||||||
|
.paymentBox {font-size: large;width: 100;height: 100;border: 1px solid #191970;text-align: center;padding-top: 35;margin-left: 70;}ul{list-style: none;padding: 0;margin: 0}li{padding-left: 10px;margin-right: 0px;background-image: url("/Creditline_core/images/tab-blue-left.gif");background-position: left top;background-repeat: no-repeat;background-color : #31659C;color: white;float: left;}li span{padding-right: 10px;padding-bottom: 3px;background-image: url("/Creditline_core/images/tab-blue-right.gif");background-position: right top;background-repeat: no-repeat;background-color : #31659C;float: left;}li a{color: white;}li a:hover{color: gold;}li a:hover span{color: gold;}</style><style media="print" type="text/css">/* HTML Elements */body{scrollbar-face-color : #31659C;scrollbar-track-color : #F1F1F1;scrollbar-base-color : #F1F1F1;scrollbar-arrow-color : #e7eff8;scrollbar-shadow-color : #31659C;scrollbar-highlight-color : #31659C;scrollbar-3dlight-color : #e7eff8;scrollbar-darkshadow-color : #e7eff8;background: #FFFFFF;font-size: 13px;font-family: Verdana, Arial, Helvetica, sans-serif;color: black;text-align: center;}h1{font-family : Verdana, Arial, Helvetica, sans-serif;font-size: 14px;font-weight : bold;color : white;padding: 3px;margin: 10px 0px 6px 0px;border-width : 1px;border-style : solid;border-color : #31659C;background-color : #31659C;text-align: left;}
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
print $html;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="500" class="StyleInfoLib">Aucune information disponible.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
elseif($format == 'xml')
|
||||||
|
{
|
||||||
|
$path = PATH_DATA.'/graydon';
|
||||||
|
$fileName = strtolower(str_replace( array(':',' '), '-', $identifier).'.xml');
|
||||||
|
|
||||||
|
//Vérifier si le rapport n'est pas disponible en base depuis une autre commandes
|
||||||
|
setDbConn('graydon');
|
||||||
|
$q = Doctrine_Query::create()
|
||||||
|
->from('Report')
|
||||||
|
->where('identifier = ?', $_REQUEST['identifier'])
|
||||||
|
->andWhere('format = ?', $format);
|
||||||
|
$report = new Report();
|
||||||
|
$report = $q->fetchOne();
|
||||||
|
|
||||||
|
//@TODO : si le rapport existe déjà ou que la date n'est pas très éloigné
|
||||||
|
if($report==FALSE)
|
||||||
|
{
|
||||||
$firephp->info('Pas en cache');
|
$firephp->info('Pas en cache');
|
||||||
//Vérifier si le rapport en ligne à déjà été demandé
|
//Vérifier si le rapport en ligne à déjà été demandé
|
||||||
$q = Doctrine_Query::create()
|
$q = Doctrine_Query::create()
|
||||||
@ -46,14 +200,15 @@ if($report==FALSE){
|
|||||||
$report = new Report();
|
$report = new Report();
|
||||||
$report = $commandes->Report;
|
$report = $commandes->Report;
|
||||||
if($commandes == FALSE && !isset($report->id)){
|
if($commandes == FALSE && !isset($report->id)){
|
||||||
$xml = getIdentite($CompanyProductIdentifier, $path.'/'.$fileName);
|
$xml = getIdentite($identifier, $CompanyProductIdentifier, $path.'/'.$fileName);
|
||||||
//La commande à déjà été demandé
|
//La commande à déjà été demandé
|
||||||
}else{
|
}else{
|
||||||
$xml = $report->content;
|
$xml = $report->content;
|
||||||
}
|
}
|
||||||
//Le rapport est disponible
|
//Le rapport est disponible
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$country = Doctrine_Query::create()
|
$country = Doctrine_Query::create()
|
||||||
->from('Country')
|
->from('Country')
|
||||||
->where('graydon_country = ?', $pays)
|
->where('graydon_country = ?', $pays)
|
||||||
@ -80,66 +235,67 @@ if($report==FALSE){
|
|||||||
|
|
||||||
//Assignation du contenu
|
//Assignation du contenu
|
||||||
$xml = $report->content;
|
$xml = $report->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
//========= Affichage des informations =========
|
//========= Affichage des informations =========
|
||||||
if(isset($xml) && $xml!='' && $xml!==FALSE){
|
if(isset($xml) && $xml!='' && $xml!==FALSE)
|
||||||
|
{
|
||||||
|
|
||||||
$tabReport = array();
|
$tabReport = array();
|
||||||
|
|
||||||
require_once 'graydon/functions.php';
|
//Création du DOM
|
||||||
require_once 'graydon/format.php';
|
$doc = new DOMDocument;
|
||||||
|
$doc->preserveWhiteSpace = false;
|
||||||
//Création du DOM
|
$doc->loadxml($xml);
|
||||||
$doc = new DOMDocument;
|
$xpath = new DOMXPath($doc);
|
||||||
$doc->preserveWhiteSpace = false;
|
$tabReport = parseReportXML($xml);
|
||||||
$doc->loadxml($xml);
|
$firephp->log($tabReport, 'tabReport');
|
||||||
$xpath = new DOMXPath($doc);
|
function utf8decode_deep($value)
|
||||||
$tabReport = parseReportXML($xml);
|
{
|
||||||
$firephp->log($tabReport, 'tabReport');
|
|
||||||
function utf8decode_deep($value)
|
|
||||||
{
|
|
||||||
$value = is_array($value) ?
|
$value = is_array($value) ?
|
||||||
array_map('utf8decode_deep', $value) :
|
array_map('utf8decode_deep', $value) :
|
||||||
cleanutf8($value);
|
cleanutf8($value);
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.bilans { margin-left:35px; }
|
.bilans { margin-left:35px; }
|
||||||
div.bilans { margin-top:15px; font:bold 16px Verdana, Arial, Sans-serif; }
|
div.bilans { margin-top:15px; font:bold 16px Verdana, Arial, Sans-serif; }
|
||||||
span.bilans { font-style:italic; }
|
span.bilans { font-style:italic; }
|
||||||
table.bilans { width:545px; }
|
table.bilans { width:545px; }
|
||||||
table.bilans .right {text-align:right;}
|
table.bilans .right {text-align:right;}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
||||||
<?php dIdentifiant($tabReport); ?>
|
<?php dIdentifiant($tabReport); ?>
|
||||||
<h2>Raison sociale et coordonnées : </h2>
|
<h2>Raison sociale et coordonnées : </h2>
|
||||||
<?php dIdentite($tabReport);?>
|
<?php dIdentite($tabReport);?>
|
||||||
<h2>Activité(s) et chiffre d'affaire de l'entreprise : </h2>
|
<h2>Activité(s) et chiffre d'affaire de l'entreprise : </h2>
|
||||||
<?php dActivite($tabReport); ?>
|
<?php dActivite($tabReport); ?>
|
||||||
<h2> Résumé financier : </h2>
|
<h2> Résumé financier : </h2>
|
||||||
<?php dResume($tabReport); ?>
|
<?php dResume($tabReport); ?>
|
||||||
<h2> Credit : </h2>
|
<h2> Credit : </h2>
|
||||||
<?php dCredit($tabReport); ?>
|
<?php dCredit($tabReport); ?>
|
||||||
<h2> Actionariat / Participation : </h2>
|
<h2> Actionariat / Participation : </h2>
|
||||||
<?php dLiens($tabReport); ?>
|
<?php dLiens($tabReport); ?>
|
||||||
<h2> Bilans : </h2>
|
<h2> Bilans : </h2>
|
||||||
<?php dBilans($tabReport); ?>
|
<?php dBilans($tabReport); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}else{
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="500" class="StyleInfoLib">Aucune information disponible.</td>
|
<td width="500" class="StyleInfoLib">Aucune information disponible.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
|
||||||
|
@ -4,11 +4,12 @@ if (!$_SESSION['connected']) die();
|
|||||||
$tabInfo = $_SESSION['tabInfo'];
|
$tabInfo = $_SESSION['tabInfo'];
|
||||||
$vue = isset($_REQUEST['vue']) ? $_REQUEST['vue'] : 'recherche';
|
$vue = isset($_REQUEST['vue']) ? $_REQUEST['vue'] : 'recherche';
|
||||||
|
|
||||||
require_once 'graydon/graydon_log.php';
|
require_once 'graydon/graydon.php';
|
||||||
require_once 'dbbootstrap.php';
|
require_once 'dbbootstrap.php';
|
||||||
|
|
||||||
/* Affichage du formulaire de recherche */
|
/* Affichage du formulaire de recherche */
|
||||||
if($vue=='recherche'){
|
if($vue=='recherche')
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@ -35,8 +36,8 @@ $(document).ready(function(){
|
|||||||
<label>Mode : </label>
|
<label>Mode : </label>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<select id="mode" name="mode">
|
<select id="mode" name="mode">
|
||||||
<option value="demo" <?php $_REQUEST['mode']=='demo' ? print ' selected' : '' ;?>>Démonstration</option>
|
|
||||||
<option value="normal" <?php $_REQUEST['mode']=='normal' ? print ' selected' : '' ;?>>Normal</option>
|
<option value="normal" <?php $_REQUEST['mode']=='normal' ? print ' selected' : '' ;?>>Normal</option>
|
||||||
|
<option value="demo" <?php $_REQUEST['mode']=='demo' ? print ' selected' : '' ;?>>Démonstration</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -56,12 +57,14 @@ require_once 'international_rechercheform.php';
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}elseif($vue=='list'){
|
}
|
||||||
|
elseif($vue=='list')
|
||||||
|
{
|
||||||
//*********** Mode démonstration
|
//*********** Mode démonstration
|
||||||
if($_REQUEST['mode']=='demo'){
|
if($_REQUEST['mode']=='demo'){
|
||||||
$pays = $_REQUEST['frmDemo']['Country'];
|
$pays = $_REQUEST['frmDemo']['Country'];
|
||||||
//Trouver le code pays pour le mode démos
|
|
||||||
|
|
||||||
|
//Trouver le code pays pour le mode démos
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
$q = Doctrine_Query::Create()
|
$q = Doctrine_Query::Create()
|
||||||
->select('code')
|
->select('code')
|
||||||
@ -70,7 +73,6 @@ require_once 'international_rechercheform.php';
|
|||||||
$result = $q->fetchOne();
|
$result = $q->fetchOne();
|
||||||
$paysCode = $result->code;
|
$paysCode = $result->code;
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['graydon']['mode'] = 'demo';
|
$_SESSION['graydon']['mode'] = 'demo';
|
||||||
$_SESSION['graydon']['paysCode'] = $paysCode;
|
$_SESSION['graydon']['paysCode'] = $paysCode;
|
||||||
$_SESSION['graydon']['pays'] = $pays;
|
$_SESSION['graydon']['pays'] = $pays;
|
||||||
@ -80,7 +82,6 @@ require_once 'international_rechercheform.php';
|
|||||||
<span class="StyleInfoLib">Résultat de la recherche de démonstration :</span>
|
<span class="StyleInfoLib">Résultat de la recherche de démonstration :</span>
|
||||||
<?php
|
<?php
|
||||||
require_once 'i18n/cleanchar.php';
|
require_once 'i18n/cleanchar.php';
|
||||||
require_once 'graydon/graydonws.php';
|
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
// Initialise the request object
|
// Initialise the request object
|
||||||
@ -90,7 +91,7 @@ require_once 'international_rechercheform.php';
|
|||||||
{
|
{
|
||||||
// Make a request on the web service
|
// Make a request on the web service
|
||||||
$result = $graydon->getDemoCompanies($request);
|
$result = $graydon->getDemoCompanies($request);
|
||||||
|
$firephp->log($result, 'DemoCompanies');
|
||||||
//Enregistrement de l'action dans les logs
|
//Enregistrement de l'action dans les logs
|
||||||
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
$transactionIdentifier = $result->Service_Log->TransactionIdentifier;
|
||||||
$sessionID = $result->Service_Log->SessionID;
|
$sessionID = $result->Service_Log->SessionID;
|
||||||
@ -108,25 +109,18 @@ require_once 'international_rechercheform.php';
|
|||||||
$log->save();
|
$log->save();
|
||||||
|
|
||||||
//Get the list of companies
|
//Get the list of companies
|
||||||
$demoCompaniesCountry = $result->DemoCompanies->CountryAndCompany;
|
$demoCompaniesCountry = $result->DemoCompanies->CountryAndCompany[0]->Country;
|
||||||
|
$demoCompanies = array();
|
||||||
|
$demoCompanies = $result->DemoCompanies->CountryAndCompany[0]->Companies->Company;
|
||||||
|
$firephp->log($demoCompanies,'demoCompanies');
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br/>
|
||||||
<span class="StyleInfoLib">Pays :</span> <span><?php print $demoCompaniesCountry->Country; ?></span>
|
<span class="StyleInfoLib">Pays :</span> <span><?php print $demoCompaniesCountry; ?></span>
|
||||||
<ol>
|
<ol>
|
||||||
<?php
|
<?php
|
||||||
$demoCompanies = array();
|
|
||||||
//Enregitrement de la liste en session
|
|
||||||
$count = count($demoCompaniesCountry->Companies->Company);
|
|
||||||
if ($count>1){
|
|
||||||
$demoCompanies = $demoCompaniesCountry->Companies->Company;
|
|
||||||
}elseif($count==1){
|
|
||||||
$demoCompanies[] = $demoCompaniesCountry->Companies->Company;
|
|
||||||
}
|
|
||||||
$firephp->log($demoCompanies,'demoCompanies');
|
|
||||||
|
|
||||||
$counterCompany = 1;
|
$counterCompany = 1;
|
||||||
foreach($demoCompanies as $company){
|
foreach($demoCompanies as $company)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<li class="StyleInfoData" type="1" value="<?php print $counterCompany++; ?>">
|
<li class="StyleInfoData" type="1" value="<?php print $counterCompany++; ?>">
|
||||||
<b><a title="Voir la fiche d'identité de cet établissement" href="index.php?page=international_identite&mode=demo&identifier=<?php print $company->CompanyMatchIdentifier;?>">
|
<b><a title="Voir la fiche d'identité de cet établissement" href="index.php?page=international_identite&mode=demo&identifier=<?php print $company->CompanyMatchIdentifier;?>">
|
||||||
@ -142,21 +136,24 @@ require_once 'international_rechercheform.php';
|
|||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}catch( SoapFault $fault ){
|
}
|
||||||
|
catch( SoapFault $fault )
|
||||||
|
{
|
||||||
if(isset($fault->faultstring) && $fault->faultcode = 'HTTP'){
|
if(isset($fault->faultstring) && $fault->faultcode = 'HTTP'){
|
||||||
print '<br/>Le service partenaire n\'est pas disponible.';
|
print '<br/>Le service partenaire n\'est pas disponible.';
|
||||||
}else{
|
}else{
|
||||||
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
$code = $fault->detail->GraydonCompanyData_Fault->FaultReturnCode;
|
||||||
$text = $fault->detail->GraydonCompanyData_Fault->FaultMessage;
|
$text = $fault->detail->GraydonCompanyData_Fault->FaultMessage;
|
||||||
$firephp->log($text,'texterror');
|
$firephp->log($text,'texterror');
|
||||||
require_once 'graydon/graydon_error.php';
|
|
||||||
if(graydon_error($code, $text)==FALSE){
|
if(graydon_error($code, $text)==FALSE){
|
||||||
print graydon_processSoapFault($graydon,$fault,$tabInfo);
|
print graydon_processSoapFault($graydon,$fault,$tabInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//*********** Mode normal
|
//*********** Mode normal
|
||||||
}elseif($_REQUEST['mode']=='normal'){
|
}
|
||||||
|
elseif($_REQUEST['mode']=='normal')
|
||||||
|
{
|
||||||
$paysCode = $_REQUEST['frmRecherche']['CountryCode'];
|
$paysCode = $_REQUEST['frmRecherche']['CountryCode'];
|
||||||
//Lire le libélé du pays graydon en fonction du code
|
//Lire le libélé du pays graydon en fonction du code
|
||||||
setDbConn('graydon');
|
setDbConn('graydon');
|
||||||
@ -176,29 +173,25 @@ require_once 'international_rechercheform.php';
|
|||||||
<span class="StyleInfoLib">Résultat de la recherche :</span>
|
<span class="StyleInfoLib">Résultat de la recherche :</span>
|
||||||
<?php
|
<?php
|
||||||
require_once 'i18n/cleanchar.php';
|
require_once 'i18n/cleanchar.php';
|
||||||
require_once 'graydon/graydonws.php';
|
|
||||||
|
|
||||||
$result = getCompanyMatches($pays);
|
$result = getCompanyMatches($pays);
|
||||||
|
|
||||||
if(is_object($result) && count($result)>0){
|
if(is_object($result) && count($result)>0)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br/>
|
||||||
<span class="StyleInfoLib">Pays :</span> <span><?php print $result->Service_Log->Country; ?></span>
|
<span class="StyleInfoLib">Pays :</span> <span><?php print $result->Service_Log->Country; ?></span>
|
||||||
<ol>
|
<ol>
|
||||||
<?php
|
<?php
|
||||||
$count = count($result->CompanyMatches->Company);
|
|
||||||
if ($count>1){
|
|
||||||
$companies = $result->CompanyMatches->Company;
|
$companies = $result->CompanyMatches->Company;
|
||||||
}elseif($count==1){
|
|
||||||
$companies[] = $result->CompanyMatches->Company;
|
|
||||||
}
|
|
||||||
$firephp->log($companies,'companies');
|
$firephp->log($companies,'companies');
|
||||||
|
|
||||||
$counterCompany = 1;
|
$counterCompany = 1;
|
||||||
foreach($companies as $company){
|
foreach($companies as $company)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<li class="StyleInfoData" type="1" value="<?php print $counterCompany++; ?>">
|
<li class="StyleInfoData" type="1" value="<?php print $counterCompany++; ?>">
|
||||||
<b><a title="Voir la fiche d'identité de cet établissement" href="index.php?page=international_identite&identifier=<?php print $company->CompanyMatchIdentifier;?>">
|
<b><a title="Voir la fiche d'identité de cet établissement" href="index.php?page=international_identite&identifier=<?php print $company->CompanyMatchIdentifier;?>&name=<?=urlencode(cleanutf8($company->Name))?>">
|
||||||
<?php print cleanutf8($company->Name); ?></a></b><br />
|
<?php print cleanutf8($company->Name); ?></a></b><br />
|
||||||
Addresse :
|
Addresse :
|
||||||
<?php
|
<?php
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
if(!isset($mode)){
|
if(!isset($mode)){
|
||||||
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : 'demo';
|
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : 'normal';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode=='normal'){
|
if($mode=='normal')
|
||||||
|
{
|
||||||
$pays = $_REQUEST['pays'];
|
$pays = $_REQUEST['pays'];
|
||||||
$paysCode = $_SESSION['graydon']['paysCode'];
|
$paysCode = $_SESSION['graydon']['paysCode'];
|
||||||
$_SESSION['graydon']['mode'] = 'normal';
|
$_SESSION['graydon']['mode'] = 'normal';
|
||||||
@ -50,12 +51,12 @@ if($mode=='normal'){
|
|||||||
foreach($tabPaysComplete as $kPays){
|
foreach($tabPaysComplete as $kPays){
|
||||||
$selected = '';
|
$selected = '';
|
||||||
//Test des la présence du pays dans chaque partenaires
|
//Test des la présence du pays dans chaque partenaires
|
||||||
$graydon = FALSE;
|
$graydonPays = FALSE;
|
||||||
$intersud = FALSE;
|
$intersudPays = FALSE;
|
||||||
if(count($tabPaysGraydon)>0 && in_array($kPays['codPays'], $tabPaysGraydon)){ $graydon = TRUE; }
|
if(count($tabPaysGraydon)>0 && in_array($kPays['codPays'], $tabPaysGraydon)){ $graydonPays = TRUE; }
|
||||||
if(count($tabPaysIntersud)>0 && in_array($kPays['codPays'], $tabPaysIntersud)){ $intersud = TRUE; }
|
if(count($tabPaysIntersud)>0 && in_array($kPays['codPays'], $tabPaysIntersud)){ $intersudPays = TRUE; }
|
||||||
|
|
||||||
if($graydon || $intersud){
|
if($graydonPays || $intersudPays){
|
||||||
if( isset($paysCode) && $paysCode==$kPays['codPays'] ){ $selected = ' selected'; }
|
if( isset($paysCode) && $paysCode==$kPays['codPays'] ){ $selected = ' selected'; }
|
||||||
print '<option value="'.$kPays['codPays'].'"'.$selected.'>'.$kPays['libPaysEN'].'</option>\n';
|
print '<option value="'.$kPays['codPays'].'"'.$selected.'>'.$kPays['libPaysEN'].'</option>\n';
|
||||||
}
|
}
|
||||||
@ -66,9 +67,8 @@ foreach($tabPaysComplete as $kPays){
|
|||||||
</div>
|
</div>
|
||||||
<div id="method">
|
<div id="method">
|
||||||
<?php
|
<?php
|
||||||
if(isset($method)){
|
if(isset($method) || $_SESSION['graydon']['paysCode'])
|
||||||
require_once './pages/graydon/methodfield.php';
|
{
|
||||||
}elseif(!isset($method) && $_SESSION['graydon']['paysCode']){
|
|
||||||
require_once './pages/graydon/methodfield.php';
|
require_once './pages/graydon/methodfield.php';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -19,8 +19,9 @@ if($ajax===TRUE){
|
|||||||
$login = strtolower($_SESSION['tabInfo']['login']);
|
$login = strtolower($_SESSION['tabInfo']['login']);
|
||||||
$siren = substr($siret,0,9);
|
$siren = substr($siret,0,9);
|
||||||
|
|
||||||
//getKbis pour la premiere requete
|
//Commande auprès du webservice
|
||||||
if($start==1){
|
if($start!=3)
|
||||||
|
{
|
||||||
$url = getKbis($siren);
|
$url = getKbis($siren);
|
||||||
$firephp->info('getKbis');
|
$firephp->info('getKbis');
|
||||||
$firephp->log($url, 'url');
|
$firephp->log($url, 'url');
|
||||||
@ -38,8 +39,10 @@ if($ajax===TRUE){
|
|||||||
print $url;
|
print $url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if($start==3){ print 'Une erreur est survenue. Merci de réssayez en cliquant <a href="/?page=kbis2&siret='.$siren.'">ici</a>'; }
|
{
|
||||||
|
print 'Une erreur est survenue. Merci de réssayez en cliquant <a href="/?page=kbis2&siret='.$siren.'">ici</a>';
|
||||||
|
}
|
||||||
|
|
||||||
//Le fichier existe sur l'extranet, etc....
|
//Le fichier existe sur l'extranet, etc....
|
||||||
if (file_exists(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf')
|
if (file_exists(PATH_DATA.'/pdf/kbis-'.$siren.'.pdf')
|
||||||
@ -165,12 +168,26 @@ else {
|
|||||||
<h3>
|
<h3>
|
||||||
<?
|
<?
|
||||||
if ($errCJ) echo 'K-Bis inexistant pour cette forme juridique.';
|
if ($errCJ) echo 'K-Bis inexistant pour cette forme juridique.';
|
||||||
elseif ($errDep) echo 'K-Bis inexistant dans ce département.';
|
elseif ($errDep) echo 'K-Bis en ligne indisponible pour ce département. ';
|
||||||
else echo 'Retour Greffe : '.$errMsg.'<!--'.$req.'-->';
|
else echo 'Retour Greffe : '.$errMsg.'<!--'.$req.'-->';
|
||||||
?>
|
?>
|
||||||
</h3>
|
</h3>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if($errDep)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="550" colspan="2" class="StyleInfoData">
|
||||||
|
Afin d'obtenir un extrait K-bis, contactez directement le greffe du tribunal à compétence commercial
|
||||||
|
dont vous trouverez les coordonnées <a href="./?page=competences&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&type=tri">ici</a>.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
3302
www/pages/liasse.php
@ -1,11 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
if (!$_SESSION['connected']) die();
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
require_once 'partenaires/classMTva.php';
|
|
||||||
require_once 'partenaires/classMMap.php';
|
|
||||||
require_once 'common/dates.php';
|
|
||||||
require_once 'cache/cache.php';
|
|
||||||
|
|
||||||
$siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
@ -13,31 +8,13 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; /
|
|||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren = substr($siret,0,9);
|
$siren = substr($siret,0,9);
|
||||||
|
|
||||||
//Générer un nom de fichier pour le cache et l'export des fichiers
|
require_once 'partenaires/classMTva.php';
|
||||||
if (($siret*1)==0 || ($siren*1)<100){
|
require_once 'partenaires/classMMap.php';
|
||||||
$fileName = $page2.'-'.$idEntreprise;
|
require_once 'common/dates.php';
|
||||||
}else{
|
require_once 'cache/cache.php';
|
||||||
$fileName = $page2.'-'.$siret;
|
require_once 'scoresws/scoresws.php';
|
||||||
}
|
|
||||||
cache_filename($fileName);
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
|
||||||
$liens = cache_get('liens');
|
|
||||||
//Affichage d'un message d'erreur
|
|
||||||
if($liens === FALSE) exit;
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
$O = $client->getLiens($siren, true);
|
|
||||||
$liens = $O['result'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('liens', $liens);
|
|
||||||
} catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
$liens = scoresws_liens($siret, $siren, $idEntreprise);
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1 class="titre">LIENS FINANCIERS</h1>
|
<h1 class="titre">LIENS FINANCIERS</h1>
|
||||||
@ -51,7 +28,7 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
<td width="350" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -202,6 +179,9 @@ $raisonSociale = $_SESSION['tabInfo']['entrep']['raisonSociale'];
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = 'liens-'.$idEntreprise;
|
||||||
|
}else{ $fileName = 'liens-'.$siret; }
|
||||||
|
|
||||||
//Exportation des données sous forme de fichier
|
//Exportation des données sous forme de fichier
|
||||||
function htmldecode($value){
|
function htmldecode($value){
|
||||||
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
$value = is_array($value) ? array_map('htmldecode', $value) : html_entity_decode($value, ENT_QUOTES, 'UTF-8');
|
||||||
|
@ -2,322 +2,10 @@
|
|||||||
<layer id="divStayTopLeft">
|
<layer id="divStayTopLeft">
|
||||||
<div style="float:left" id="my_menu" class="sdmenu">
|
<div style="float:left" id="my_menu" class="sdmenu">
|
||||||
<img src="./img/logo_menu.gif" width="200" height="65">
|
<img src="./img/logo_menu.gif" width="200" height="65">
|
||||||
|
<?php
|
||||||
|
require_once 'menu/menu.php';
|
||||||
|
print menu();
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>RECHERCHES</span>
|
|
||||||
<a href="/?page=recherche&vue=ent">Rechercher une entreprise</a>
|
|
||||||
<a href="/?page=recherche&vue=dir">Rechercher par dirigeant</a>
|
|
||||||
<?php
|
|
||||||
// Recherche internationale
|
|
||||||
if (preg_match('/INTERNATIONAL/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="/?page=international_recherche">Recherche Internationale</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Derniere recherche
|
|
||||||
if (isset($_SESSION['list_pre']) || $_SESSION['list_pre']!='')
|
|
||||||
{ $href = './?page=recherche&vue=list_pre'; } else { $href='#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){print '<font color="gray">';} ?>Dernière recherche<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Liste des dernieres recherche
|
|
||||||
if( count($_SESSION['recherche']['list'])>0 && ( $_SESSION['tabInfo']['idClient']==1 || $_SESSION['tabInfo']['idClient']==2 ) ){
|
|
||||||
?>
|
|
||||||
<a href="/?page=recherche&vue=histo">Liste des dernières recherches</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Centrale IparI
|
|
||||||
if (preg_match('/IPARI/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{
|
|
||||||
if ($siret*1!=0) { $href = IPARI_URL.'?siret='.$siret; } else { $href = IPARI_URL; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>" target="_blank">Centrale IparI ©</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>IDENTITE</span>
|
|
||||||
<?php
|
|
||||||
// Fiche d'identite
|
|
||||||
if ($siret*1==0 && $idEntreprise*1==0)
|
|
||||||
{ $href = '#'; } else{ $href = './?page=identite&siret='.$siret.'&idEntreprise='.$idEntreprise; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Fiche d'identité<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Liste des etablissements
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=etablissements&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Liste des établisssements<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Liens inter-entreprise
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=liens&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Liens inter-entreprise<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Modifications INSEE
|
|
||||||
if (preg_match('/EVENINSEE/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=evenements&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Modifications Insee<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!--Identite approfondie-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>DIRIGEANTS</span>
|
|
||||||
<?php
|
|
||||||
// Liste des dirigeants
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=dirigeants&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Liste des dirigeants<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Historique des dirigeants
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=dirigeants&vue=histo&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Historique des dirigeants<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>ELEMENTS FINANCIERS</span>
|
|
||||||
<?php
|
|
||||||
// Synthese
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=synthese&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Synthèse<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Bilans, Compte de résultat
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=bilans&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Bilans, Compte de résultat<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Ratios
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=ratios&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Ratios<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Liasse fiscale
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=liasse&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Liasse fiscale<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Bourse et Cotations
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=bourse&siret='.$siret.'&idEntreprise='.$idEntreprise; } else{ $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href;?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Bourse & Cotations<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>ELEMENTS JURIDIQUES</span>
|
|
||||||
<?php
|
|
||||||
// Annonces Legales
|
|
||||||
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
|
||||||
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{
|
|
||||||
$href = './?page=annonces&siret='.$siret.'&source='.$source.'&idEntreprise='.$idEntreprise;
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Annonces Légales<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}elseif ($siret*1==0){
|
|
||||||
if (!isset($idEntreprise) || $idEntreprise==0){ $href = '#'; } else { $href = './?page=annonces&idEntreprise='.$idEntreprise.'&idan='.$sourceId.'&siret='.$siret.'&source='.$source; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Annonces Légales<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Information Réglementée
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=infosreg&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Information Règlementée<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Competences territoriales
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=competences&siret='.$siret.'&codcom='.$tabEntrep['codeCommune'].'&vue=tous&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Compétences Territoriales<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Convention collective
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=conventions&siret='.$siret.'&codcom='.$tabEntrep['codeCommune'].'&nafEn='.$tabEntrep['nafEn'].'&nafEt='.$tabEntrep['nafEt'].'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Conventions collectives<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Marques déposés
|
|
||||||
if (preg_match('/MARQUES/i', $_SESSION['tabInfo']['droits'])) {
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=marques&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Marques déposées<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<div class="collapsed">
|
|
||||||
|
|
||||||
<span>EVALUATION</span>
|
|
||||||
<?php
|
|
||||||
// IndiScore
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{ $href = './?page=indiscore&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>IndiScore ©<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// IndiScore+
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{
|
|
||||||
if ($_SESSION['tabInfo']['login']=='reunicacsf' || $_SESSION['tabInfo']['login']=='testreunica' || $_SESSION['tabInfo']['login']=='ylenaour' || $_SESSION['tabInfo']['login']=='mheitz' || $_SESSION['tabInfo']['login']=='mricois' || $_SESSION['tabInfo']['login']=='jmartory' )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="#"><font color="Gray">IndiScore + ©</font></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scoring Credit Safe
|
|
||||||
if ( preg_match('/scorecsf/i', $_SESSION['tabInfo']['droits']) )
|
|
||||||
{
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']) ) { $href = './?page=scorescf&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#';}
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Scoring Credit Safe ©<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rapport de synthèse
|
|
||||||
if( ($_SESSION['tabInfo']['idClient']==1) )
|
|
||||||
{
|
|
||||||
if ( $siret*1!=0 ) { $href = './?page=rsynthese&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#';}
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Rapport de synthèse<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Enquete commerciale
|
|
||||||
if ($siret*1!=0 && ($_SESSION['tabInfo']['idClient']!=34 || $_SESSION['nowAuthorized']))
|
|
||||||
{
|
|
||||||
if (preg_match('/enquetec/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{ $href = './?page=enquetec&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>">Enquête commerciale</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>PIECES OFFICIELLES</span>
|
|
||||||
<?php
|
|
||||||
// Kbis
|
|
||||||
if ($siret*1!=0)
|
|
||||||
{ $href = './?page=kbis2&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
if(preg_match('/KBIS/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>K-Bis<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compte annuels
|
|
||||||
if ($siret*1!=0)
|
|
||||||
{ $href = './?page=greffes&vue=bilans&siret='.$siret.'&idEntreprise='.$idEntreprise; } else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Comptes annuels<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Actes et statuts
|
|
||||||
if ($siret*1!=0) { $href = './?page=greffes&vue=actes&siret='.$siret.'&idEntreprise='.$idEntreprise; }
|
|
||||||
elseif ( $siret==0 && isset($idEntreprise) && $idEntreprise!=0 )
|
|
||||||
{
|
|
||||||
$source = $_SESSION['tabInfo']['entrep']['Source'];
|
|
||||||
$sourceId = $_SESSION['tabInfo']['entrep']['SourceId'];
|
|
||||||
$href = '/?page=greffes&vue=actes&idEntreprise='.$idEntreprise.'&idan='.$sourceId.'&siret='.$siret.'&source='.$source;
|
|
||||||
}
|
|
||||||
else { $href = '#'; }
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Actes & Statuts<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsed">
|
|
||||||
<span>OPTIONS</span>
|
|
||||||
<?php
|
|
||||||
// Mes Options
|
|
||||||
if ($_SESSION['tabInfo']['login']<>'testreunica' && $_SESSION['tabInfo']['login']<>'reunicacsf' && $_SESSION['tabInfo']['login']<>'reunicastats' )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="/?page=moncompte&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Mes options</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mes Surveillances
|
|
||||||
if (preg_match('/SURVLISTE/i', $_SESSION['tabInfo']['droits']))
|
|
||||||
{ $href = './?page=surveillance'; } else { $href = '#';}
|
|
||||||
?>
|
|
||||||
<a href="<?=$href?>"><?php if($href=='#'){ print '<font color="gray">';} ?>Mes surveillances<?php if($href=='#'){print '</font>';} ?></a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Administration
|
|
||||||
if ( ($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur') && $_SESSION['tabInfo']['login']<>'testreunica' && $_SESSION['tabInfo']['login']<>'reunicacsf' && $_SESSION['tabInfo']['login']<>'reunicastats')
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="/?page=administration&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Administration</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Statistiques
|
|
||||||
if (($_SESSION['tabInfo']['profil']=='Administrateur' || $_SESSION['tabInfo']['profil']=='SuperAdministrateur' ) && $_SESSION['tabInfo']['login']=='ylenaour' || $_SESSION['tabInfo']['login']=='mheitz' || $_SESSION['tabInfo']['login']=='jmartory' || $_SESSION['tabInfo']['login']=='reunicastats' )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="/?page=stats&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Statistiques</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Surveillances
|
|
||||||
if (substr( $_SESSION['tabInfo']['login'],0,6)=='cnasea' || $_SESSION['tabInfo']['idClient']==32 )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<a href="/?page=survliste&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>">Surveillances</a>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logout
|
|
||||||
?>
|
|
||||||
<a href="/?page=main&action=logout">Se déconnecter</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
//Ajout des paramètres optionnelles pour la page recherche (lors de la première recherche)
|
//Ajout des paramètres optionnelles pour la page recherche (lors de la première recherche)
|
||||||
if ($page=='recherche'){
|
if ($page=='recherche'){
|
||||||
if ($_REQUEST['vue']=='list' ) $_SERVER['QUERY_STRING'] = str_replace('vue=list', 'vue=list_pre', $_SERVER['QUERY_STRING']);
|
if ($_REQUEST['vue']=='list' ) $_SERVER['QUERY_STRING'] = str_replace('vue=list', 'vue=list_pre', $_SERVER['QUERY_STRING']);
|
||||||
@ -335,8 +23,9 @@ if ($page=='recherche'){
|
|||||||
<a href="/?<?=$printUrl;?>&sortie=prt" title="Impression" target="_blank">
|
<a href="/?<?=$printUrl;?>&sortie=prt" title="Impression" target="_blank">
|
||||||
<img src="./img/exporticones/printer.png"" alt="Impression"/></a>
|
<img src="./img/exporticones/printer.png"" alt="Impression"/></a>
|
||||||
<?php
|
<?php
|
||||||
if($page!='recherche' || $page=='')
|
if($page!='recherche' && $page!='main' && $page!='' )
|
||||||
{
|
{
|
||||||
|
$firephp->log($page, 'page');
|
||||||
?>
|
?>
|
||||||
<a href="./?<?=$_SERVER['QUERY_STRING'];?>&sortie=pdf" target="_blank" title="PDF"><img src="./img/exporticones/pdf.png" alt="PDF"></a>
|
<a href="./?<?=$_SERVER['QUERY_STRING'];?>&sortie=pdf" target="_blank" title="PDF"><img src="./img/exporticones/pdf.png" alt="PDF"></a>
|
||||||
<?php
|
<?php
|
||||||
|
@ -33,7 +33,8 @@ switch($tri){
|
|||||||
case 'datederenvoi': $triws = 'dateDerEnvoi'; break;
|
case 'datederenvoi': $triws = 'dateDerEnvoi'; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabSource = array('annonces', 'insee', 'bilans', 'score', 'actes', 'dirigeants');
|
// Source => Permission
|
||||||
|
$tabSource = array('annonces' => 'annonce', 'insee'=>'insee', 'bilans'=>'bilan', 'score'=>'score', 'actes'=>'actes', 'dirigeants'=>'dirigeants');
|
||||||
$nbAffichage = 100;
|
$nbAffichage = 100;
|
||||||
|
|
||||||
//Enregistrement pour liste dernière recherche
|
//Enregistrement pour liste dernière recherche
|
||||||
@ -65,30 +66,6 @@ try{
|
|||||||
require_once 'surveillance/surveillance_tri.php';
|
require_once 'surveillance/surveillance_tri.php';
|
||||||
$listTrier = $fonctionTri($listSurveillance);
|
$listTrier = $fonctionTri($listSurveillance);
|
||||||
?>
|
?>
|
||||||
<style>
|
|
||||||
#surveillance {margin:5px; border-collapse:collapse; border:1px solid; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
|
|
||||||
#surveillance tr {border:1px solid;}
|
|
||||||
#surveillance th {border:1px solid; padding:5px 15px 5px 2px;}
|
|
||||||
#surveillance td {border:1px solid; text-align:center; padding:2px; }
|
|
||||||
#surveillance .aleft {text-align:left;}
|
|
||||||
#surveillance .action {clear:both; margin:0; padding:0; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
|
|
||||||
#surveillance td p {line-height:16px;}
|
|
||||||
#surveillance .action p {display:block; float:left; line-height:16px; margin:0;}
|
|
||||||
#surveillance .action a {display:block; float:right;}
|
|
||||||
#surveillance .action img {vertical-align:middle;}
|
|
||||||
#surveillance #type {width:120px;}
|
|
||||||
#info {margin:5px 5px 5px 30px; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
|
|
||||||
#info td {padding-right:10px;}
|
|
||||||
table.tablesorter thead tr .header { background-image:url(./img/bg.gif); background-repeat:no-repeat; background-position:center right; cursor:pointer; }
|
|
||||||
table.tablesorter thead tr .headerSortUp { background-image: url(./img/asc.gif); }
|
|
||||||
table.tablesorter thead tr .headerSortDown { background-image: url(./img/desc.gif); }
|
|
||||||
#tri li {list-syle:none; margin-left:10px; display:inline; }
|
|
||||||
p.options {margin-left:10px; margin-top:5px;}
|
|
||||||
</style>
|
|
||||||
<link rel="stylesheet" href="./css/thickbox.css" type="text/css" />
|
|
||||||
<script type="text/javascript" src="./js/thickbox.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/jquery.tablesorter.js"></script>
|
|
||||||
<script type="text/javascript" src="./js/jquery.pngFix.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(document).pngFix();
|
$(document).pngFix();
|
||||||
@ -156,11 +133,14 @@ Afficher uniquement les suveillances de type
|
|||||||
<select name="type">
|
<select name="type">
|
||||||
<option value="-">toutes</option>
|
<option value="-">toutes</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabSource as $s)
|
foreach($tabSource as $s => $perm)
|
||||||
{
|
{
|
||||||
?>
|
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits']))
|
||||||
<option value="<?=$s?>" <?php if(isset($source) && $source==$s){print 'selected';}?>><?=$s?></option>
|
{
|
||||||
<?php
|
?>
|
||||||
|
<option value="<?=$s?>" <?php if(isset($source) && $source==$s){print 'selected';}?>><?=$s?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@ -232,22 +212,33 @@ foreach($listTrier as $item)
|
|||||||
<td width="110"><?php print $item['rs']; ?><br/><i><?php print $item['cp'].' '.$item['ville']; ?></i></td>
|
<td width="110"><?php print $item['rs']; ?><br/><i><?php print $item['cp'].' '.$item['ville']; ?></i></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabSource as $source){
|
foreach($tabSource as $source => $perm)
|
||||||
if(isset($item['sources'][$source])){
|
{
|
||||||
foreach($item['sources'][$source] as $surveillance){
|
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
{
|
||||||
|
if(isset($item['sources'][$source]))
|
||||||
|
{
|
||||||
|
foreach($item['sources'][$source] as $surveillance)
|
||||||
|
{
|
||||||
if($surveillance['ref']!=''){
|
if($surveillance['ref']!=''){
|
||||||
print '<p>'.$surveillance['ref'].'</p>';
|
print '<p>'.$surveillance['ref'].'</p>';
|
||||||
}else{?> <p>-</p> <?php }
|
}else{?> <p>-</p> <?php }
|
||||||
}
|
}
|
||||||
}else{?> <p>-</p> <?php }
|
}else{?> <p>-</p> <?php }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td id="type" class="aleft">
|
<td id="type" class="aleft">
|
||||||
<?php
|
<?php
|
||||||
foreach($tabSource as $source){
|
foreach($tabSource as $source => $perm)
|
||||||
if(array_key_exists($source, $item['sources'])){
|
{
|
||||||
foreach($item['sources'][$source] as $surveillance){
|
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
{
|
||||||
|
if(array_key_exists($source, $item['sources']))
|
||||||
|
{
|
||||||
|
foreach($item['sources'][$source] as $surveillance)
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<div id="a<?php print $item['siren'];?>" class="action">
|
<div id="a<?php print $item['siren'];?>" class="action">
|
||||||
<p><?php print ucfirst($source);?></p>
|
<p><?php print ucfirst($source);?></p>
|
||||||
@ -257,7 +248,9 @@ foreach($listTrier as $item)
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<div id="a<?php print $item['siren'];?>" class="action">
|
<div id="a<?php print $item['siren'];?>" class="action">
|
||||||
<p><?php print ucfirst($source);?></p>
|
<p><?php print ucfirst($source);?></p>
|
||||||
@ -269,22 +262,28 @@ foreach($listTrier as $item)
|
|||||||
<br/>
|
<br/>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabSource as $source){
|
foreach($tabSource as $source => $perm){
|
||||||
|
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
{
|
||||||
if(array_key_exists($source, $item['sources'])){
|
if(array_key_exists($source, $item['sources'])){
|
||||||
foreach($item['sources'][$source] as $surveillance){
|
foreach($item['sources'][$source] as $surveillance){
|
||||||
print '<p>'.substr($surveillance['dateAjout'],8,2).'/'.substr($surveillance['dateAjout'],5,2).'/'.substr($surveillance['dateAjout'],0,4).'</p>';
|
print '<p>'.substr($surveillance['dateAjout'],8,2).'/'.substr($surveillance['dateAjout'],5,2).'/'.substr($surveillance['dateAjout'],0,4).'</p>';
|
||||||
}
|
}
|
||||||
}else{?> <p>-</p> <?php }
|
}else{?> <p>-</p> <?php }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabSource as $source){
|
foreach($tabSource as $source => $perm){
|
||||||
|
if(preg_match('/surv'.$perm.'/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
{
|
||||||
if(array_key_exists($source, $item['sources'])){
|
if(array_key_exists($source, $item['sources'])){
|
||||||
foreach($item['sources'][$source] as $surveillance){
|
foreach($item['sources'][$source] as $surveillance){
|
||||||
$pDate = substr($surveillance['dateDerEnvoi'],8,2).'/'.substr($surveillance['dateDerEnvoi'],5,2).'/'.substr($surveillance['dateDerEnvoi'],0,4);
|
$pDate = substr($surveillance['dateDerEnvoi'],8,2).'/'.substr($surveillance['dateDerEnvoi'],5,2).'/'.substr($surveillance['dateDerEnvoi'],0,4);
|
||||||
@ -292,6 +291,7 @@ foreach($listTrier as $item)
|
|||||||
}
|
}
|
||||||
}else{?> <p>-</p> <?php }
|
}else{?> <p>-</p> <?php }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!$_SESSION['connected']) die();
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
require_once 'cache/cache.php';
|
|
||||||
require_once 'ratios/ratios.php';
|
|
||||||
|
|
||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
@ -11,180 +8,179 @@ $idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; /
|
|||||||
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
isset($_REQUEST['bilan']) ? $bilan=$_REQUEST['bilan'] : $bilan=0 ;
|
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||||||
|
isset($_REQUEST['mil']) ? $mil=$_REQUEST['mil'] : $mil='' ;
|
||||||
isset($_REQUEST['ratio']) ? $ratio=$_REQUEST['ratio'] : $ratio='' ;
|
isset($_REQUEST['ratio']) ? $ratio=$_REQUEST['ratio'] : $ratio='' ;
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
require_once 'cache/cache.php';
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
require_once 'ratios/ratios.php';
|
||||||
$fileName.= '-'.$bilan;
|
require_once 'scoresws/scoresws.php';
|
||||||
if($ratio!=''){$fileName.='-'.$ratio;}
|
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) )
|
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page.'-'.$idEntreprise;
|
||||||
|
}else{ $fileName = $page.'-'.$siren; }
|
||||||
|
|
||||||
|
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||||||
|
$bilansInfos = $result['bilansInfos'];
|
||||||
|
$ratiosInfos = $result['ratiosInfos'];
|
||||||
|
$ratiosEntrep = $result['ratiosEntrep'];
|
||||||
|
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||||||
|
$ratiosSecteur = $result['ratiosSecteur'];
|
||||||
|
$firephp->log($bilansInfos, 'bilansInfos');
|
||||||
|
$firephp->log($ratiosSecteur, 'ratiosSecteur');
|
||||||
|
|
||||||
|
//Tableau des différents type de bilans
|
||||||
|
$typBil = array('C'=>'Consolidé', 'N'=>'', 'S'=>'Réel Simplifié', 'B'=> 'Banque', 'A'=>'Assurance');
|
||||||
|
|
||||||
|
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
|
||||||
|
$numBilanN = $numBilan['N'];
|
||||||
|
$numBilanC = $numBilan['C'];
|
||||||
|
$numBilanB = $numBilan['B'];
|
||||||
|
$numBilanA = $numBilan['A'];;
|
||||||
|
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, array(), array(), array(), $typeBilan);
|
||||||
|
$firephp->log($bilansInfos, 'bilansInfos');
|
||||||
|
$firephp->log($ratiosSecteur, 'ratiosSecteur');
|
||||||
|
//On détermine le bilan sélectionné
|
||||||
|
if($mil=='')
|
||||||
{
|
{
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
$bilan = 0;
|
||||||
$ratiosEntrep = cache_get('ratiosEntrep');
|
$mil = $bilansInfos[$bilan]['typeBilan'].substr($bilansInfos[$bilan]['dateCloture'],6,2).substr($bilansInfos[$bilan]['dateCloture'],4,2).substr($bilansInfos[$bilan]['dateCloture'],0,4);
|
||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
}
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
else
|
||||||
$ratiosSecteur = cache_get('ratiosSecteur');
|
{
|
||||||
|
if(count($bilansInfos)>0)
|
||||||
}else{
|
{
|
||||||
cache_delete();
|
$countBilans = 0;
|
||||||
try {
|
foreach($bilansInfos as $bilanItem)
|
||||||
$O = $client->getRatios($siren, 'bilan');
|
{
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
$millesime = $bilanItem['typeBilan'].substr($bilanItem['dateCloture'],6,2).substr($bilanItem['dateCloture'],4,2).substr($bilanItem['dateCloture'],0,4);
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
if($mil==$millesime)
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
{
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
$bilan = $countBilans;
|
||||||
$ratiosSecteur = $O['result']['RatiosSecteur'];
|
break;
|
||||||
|
|
||||||
//Affichage des dates dans l'ordre décroissant
|
|
||||||
//Tri des tableaux
|
|
||||||
foreach ($bilansInfos as $key => $row) {
|
|
||||||
$bilansInfos[$key]['cle'] = $key;
|
|
||||||
$date[$key] = $row['dateCloture'];
|
|
||||||
$duree[$key] = $row['duree'];
|
|
||||||
$devise[$key] = $row['devise'];
|
|
||||||
$unite[$key] = $row['unite'];
|
|
||||||
$cle[$key] = $row['cle'];
|
|
||||||
}
|
}
|
||||||
array_multisort($date, SORT_DESC, $duree, SORT_DESC, $devise, SORT_DESC, $unite, SORT_DESC, $cle, SORT_DESC, $bilansInfos);
|
$countBilans++;
|
||||||
|
|
||||||
//Tri des autres tableaux
|
|
||||||
$tempRatiosEntrep = $ratiosEntrep;
|
|
||||||
$tempRatiosEntrepEvol = $ratiosEntrepEvol;
|
|
||||||
$tempRatiosSecteur = $ratiosSecteur;
|
|
||||||
$i = 0;
|
|
||||||
foreach ($bilansInfos as $row){
|
|
||||||
$ratiosEntrep[$i] = $tempRatiosEntrep[$row['cle']];
|
|
||||||
$ratiosEntrepEvol[$i] = $tempRatiosEntrepEvol[$row['cle']];
|
|
||||||
$ratiosSecteur[$i] = $tempRatiosSecteur[$row['cle']];
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
//Fin de tri des tableaux
|
|
||||||
|
|
||||||
cache_add('bilansInfos', $bilansInfos);
|
|
||||||
cache_add('ratiosEntrep', $ratiosEntrep);
|
|
||||||
cache_add('ratiosEntrepEvol', $ratiosEntrepEvol);
|
|
||||||
cache_add('ratiosInfos', $ratiosInfos);
|
|
||||||
cache_add('ratiosSecteur', $ratiosSecteur);
|
|
||||||
|
|
||||||
}catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabRatio = array(
|
|
||||||
0 => array('titre'=>'EQUILIBRE FINANCIER'),
|
|
||||||
|
|
||||||
1 => array('titre'=>'MARGE BRUTE D\'AUTOFINANCEMENT', 'stitre'=>'(MBA ou CAF)', 'ratio'=>'r233', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
2 => array('titre'=>'COUVERTURE du BFR ', 'stitre'=>'(FR/BFR)', 'ratio'=>'r234', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
3 => array('titre'=>'COUVERTURE des IMMOS NETTES ', 'stitre'=>'(Capitaux permanents / Immobilisations nettes)', 'ratio'=>'r237', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
4 => array('titre'=>'COUVERTURE du CA ', 'stitre'=>'(Fond de roulement net global sur 12m x 360 / Chiffre d\'affaire)', 'ratio'=>'r238', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
5 => array('titre'=>'SOLVABILITE ', 'stitre'=>'(Capitaux propres / Ensemble des dettes)', 'ratio'=>'r239', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
6 => array('titre'=>'INDEPENDANCE FINANCIERE ', 'stitre'=>'(Cap.propres/Capitaux permanents)', 'ratio'=>'r240', 'parent'=>0, 'position'=>'>' ),
|
|
||||||
|
|
||||||
7 => array('titre'=>'PROFITABILITE'),
|
|
||||||
|
|
||||||
8 => array('titre'=>'RENTABILITE ECONOMIQUE ', 'stitre'=>'(EBE/TOTAL bilan)', 'ratio'=>'r262', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
9 => array('titre'=>'RENTABILITE FINANCIERE ', 'stitre'=>'(Résult.Net/Cap.propres)', 'ratio'=>'r263', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
10 => array('titre'=>'RENTABILITE COMMERCIALE ', 'stitre'=>'(Résultat net/CA)', 'ratio'=>'r264', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
11 => array('titre'=>'CONTRIBUTION DU CAPITAL', 'stitre'=>'(Capacité d\'autofinancement sur 12 mois / Capitaux permanents)', 'ratio'=>'r265', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
12 => array('titre'=>'CONTRIBUTION DE LA VA', 'stitre'=>'(Capacité d\'autofinancement / Valeur ajoutée)', 'ratio'=>'r266', 'parent'=>7, 'position'=>'>' ),
|
|
||||||
|
|
||||||
13 => array('titre'=>'LIQUIDITE'),
|
|
||||||
|
|
||||||
14 => array('titre'=>'LIQUIDITE IMMEDIATE', 'stitre'=>'(Disponibilité / Dettes CT)', 'ratio'=>'r250', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
15 => array('titre'=>'LIQUIDITE GENERALE', 'stitre'=>'(Act.circulant net/Dettes CT)', 'ratio'=>'r251', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
16 => array('titre'=>'LIQUIDITE REDUITE', 'stitre'=>'(Disponibilité et créances réelles /Dettes CT)', 'ratio'=>'r252', 'parent'=>13, 'position'=>'>' ),
|
|
||||||
|
|
||||||
17 => array('titre'=>'ENDETTEMENT'),
|
|
||||||
|
|
||||||
18 => array('titre'=>'ENDETTEMENT ', 'stitre'=>'(Dettes a + 1 an / Capitaux propres)', 'ratio'=>'r244', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
19 => array('titre'=>'CAPACITE DE REMBOURSEMENT', 'stitre'=>'(Dettes.bancaires.(+MT+LT+C.bail)/CAF)', 'ratio'=>'r247', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
20 => array('titre'=>'FINANCEMENT DES STOCKS', 'stitre'=>'(Dettes aux fournisseurs / Stock)', 'ratio'=>'r248', 'parent'=>17, 'position'=>'<' ),
|
|
||||||
|
|
||||||
21 => array('titre'=>'PRODUCTIVITE'),
|
|
||||||
|
|
||||||
22 => array('titre'=>'PRODUCTIVITE DE L\'ACTIF', 'stitre'=>'(Chiffre d\'affaire / Actif comptable)', 'ratio'=>'r271', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
23 => array('titre'=>'DUREE CLIENT', 'stitre'=>'(Rotation clients en VJ TTC)', 'ratio'=>'r278', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
24 => array('titre'=>'DUREE FOURNISSEUR', 'stitre'=>'(Rotation fournisseurs en JA TTC)', 'ratio'=>'r279', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
25 => array('titre'=>'POIDS MASSE SALARIALE', 'stitre'=>'(Ch personnel / VA)', 'ratio'=>'r281', 'parent'=>21, 'position'=>'<' ),
|
|
||||||
26 => array('titre'=>'RENDEMENT', 'stitre'=>'(Production sur 12mois / Effectif)', 'ratio'=>'r261', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
27 => array('titre'=>'PRODUCTIVITE', 'stitre'=>'(CA / Effectif)', 'ratio'=>'r267', 'parent'=>21, 'position'=>'>' ),
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1 class="titre">RATIOS</h1>
|
<h1 class="titre">RATIOS</h1>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||||
<td width="340" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
|
<td width="340" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$firephp->log($_SESSION, 'SESSION');
|
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
|
||||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
{
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
<tr><td width="30"> </td><td><b>Aucun bilan disponible pour cette entreprise !</b></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}
|
||||||
|
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr><td width="30"> </td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Secteur d'activité :</td>
|
<td width="200" class="StyleInfoLib">Secteur d'activité :</td>
|
||||||
<td width="340" class="StyleInfoData">
|
<td width="340" class="StyleInfoData">
|
||||||
<?php print $_SESSION['tabInfo']['entrep']['nafEn']; ?> - <?php print $_SESSION['tabInfo']['entrep']['nafEnLib']; ?>
|
<?php print $_SESSION['tabInfo']['entrep']['nafEn']; ?> - <?php print $_SESSION['tabInfo']['entrep']['nafEnLib']; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<?php
|
||||||
|
if ( $numBilanN>0 || $numBilanC>0 )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||||
|
<td width="340" class="StyleInfoData">
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||||||
|
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Millésime</td>
|
<td width="200" class="StyleInfoLib">Millésime</td>
|
||||||
<td width="340" class="StyleInfoData">
|
<td width="340" class="StyleInfoData">
|
||||||
<form name="selectBilan" method="post" action="index.php?<?=$_SERVER['QUERY_STRING'];?>">
|
<form name="selectBilan" method="post" action="index.php?<?=$_SERVER['QUERY_STRING'];?>">
|
||||||
<select name="bilan">
|
<select name="mil">
|
||||||
<?php
|
<?php
|
||||||
|
if(count($bilansInfos)>0)
|
||||||
|
{
|
||||||
$countBilans = 0;
|
$countBilans = 0;
|
||||||
if(count($bilansInfos)>0){
|
foreach($bilansInfos as $bilanItem)
|
||||||
foreach($bilansInfos as $bilanItem){
|
{
|
||||||
if(isset($bilanItem['dateCloture'])) {
|
if($countBilans>=5){ break; }
|
||||||
|
$millesime = '';
|
||||||
|
if(isset($bilanItem['dateCloture']))
|
||||||
|
{
|
||||||
|
$annee = substr($bilanItem['dateCloture'],6,2).substr($bilanItem['dateCloture'],4,2).substr($bilanItem['dateCloture'],0,4);
|
||||||
|
$millesime = $bilanItem['typeBilan'].$annee;
|
||||||
?>
|
?>
|
||||||
<option value="<?php print $countBilans;?>"<?php if($bilan==$countBilans){ print 'selected="selected"';} ?>><?php print substr($bilanItem['dateCloture'],6,2).'/'.substr($bilanItem['dateCloture'],4,2).'/'.substr($bilanItem['dateCloture'],0,4);?></option>
|
<option value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&mil=<?=$millesime?>&type=<?=substr($millesime,0,1);?>"<?php if($mil==$millesime){ print 'selected="selected"';} ?>>
|
||||||
|
<?=substr($bilanItem['dateCloture'],6,2).'/'.substr($bilanItem['dateCloture'],4,2).'/'.substr($bilanItem['dateCloture'],0,4);?>
|
||||||
|
<?php
|
||||||
|
if( isset($typBil[$bilanItem['typeBilan']]) &&
|
||||||
|
( isset($typBil[$bilanItem['typeBilan']])!='N' ||
|
||||||
|
isset($typBil[$bilanItem['typeBilan']])!='') )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<?=$typBil[$bilanItem['typeBilan']]?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
</option>
|
||||||
|
<?php
|
||||||
$countBilans++;
|
$countBilans++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else{ print '-'; }
|
}else{ print '-'; }
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<a href="javascript:document.selectBilan.submit();">Ok</a>
|
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Durée du bilan</td>
|
<td width="200" class="StyleInfoLib">Durée du bilan</td>
|
||||||
<td width="340" class="StyleInfoData">
|
<td width="340" class="StyleInfoData">
|
||||||
<?php
|
<?php
|
||||||
if(isset($bilansInfos[$bilan]['dateCloture'])) {
|
if(isset($bilansInfos[$bilan]['dateCloture']))
|
||||||
|
{
|
||||||
|
|
||||||
print $bilansInfos[$bilan]['duree']; ?> mois
|
print $bilansInfos[$bilan]['duree']; ?> mois
|
||||||
<?php }else{ print '-'; } ?>
|
<?php
|
||||||
|
}else{ print '-'; }
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if($ratio!=''){
|
if($ratio!=''){
|
||||||
?>
|
?>
|
||||||
@ -202,7 +198,7 @@ if (count($ratiosEntrep)==0 || !isset($ratiosEntrep)){
|
|||||||
</table>
|
</table>
|
||||||
<table id="ratios">
|
<table id="ratios">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php print ratios_tablerow($ratiosInfos, $tabRatio, $bilan, $ratio);?>
|
<?php print ratios_tablerow($ratiosInfos, $bilan, $ratio);?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
@ -20,6 +20,12 @@ switch ($vueRecherche) {
|
|||||||
case 'histo':
|
case 'histo':
|
||||||
require_once 'recherche/recherche_histo.php';
|
require_once 'recherche/recherche_histo.php';
|
||||||
break;
|
break;
|
||||||
|
case 'annoncelist':
|
||||||
|
require_once 'recherche/recherche_annonceslist.php';
|
||||||
|
break;
|
||||||
|
case 'annonce':
|
||||||
|
require_once 'recherche/recherche_annonces.php';
|
||||||
|
break;
|
||||||
case 'list_pre':
|
case 'list_pre':
|
||||||
$formR = unserialize( @gzuncompress($_SESSION['list_pre']) );
|
$formR = unserialize( @gzuncompress($_SESSION['list_pre']) );
|
||||||
case 'list':
|
case 'list':
|
||||||
|
630
www/pages/rsynthesemin.php
Normal file
@ -0,0 +1,630 @@
|
|||||||
|
<?php
|
||||||
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
|
//Traitement des paramètres
|
||||||
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
|
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||||||
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
||||||
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
|
require_once 'scoresws/scoresws.php';
|
||||||
|
require_once 'common/dates.php';
|
||||||
|
require_once 'utils.php';
|
||||||
|
require_once 'user/user.php';
|
||||||
|
|
||||||
|
$etab = scoresws_identite($siret, $siren, $idEntreprise);
|
||||||
|
?>
|
||||||
|
<div id="center">
|
||||||
|
<h1>RAPPORT DE SYNTHESE</h1>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Numéro identifiant Siret du siège</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=substr($etab['SiretSiege'],0,3).' '.substr($etab['SiretSiege'],3,3).' '.substr($etab['SiretSiege'],6,3).' <i>'.substr($etab['SiretSiege'],9,5).'</i>'?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Numéro R.C.</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['NumRC']?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Entreprise active INSEE</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
if ($etab['Actif']==1)
|
||||||
|
echo 'Oui';
|
||||||
|
else {
|
||||||
|
echo '<b>NON</b>';
|
||||||
|
$dateCloture=str_replace('-','',$etab['DateClotEt']);
|
||||||
|
if ($etab['DateClotEt']<>'')
|
||||||
|
echo "<i> (Fin d'activité en ".WDate::dateT('Ymd', 'm/Y', $dateCloture).')</i>';
|
||||||
|
}
|
||||||
|
if ($etab['Siren']*1<>0 && preg_match('/AVISINSEE/i', $_SESSION['tabInfo']['droits']))
|
||||||
|
echo ' <a title="Voir l\'avis de situation correspondant de l\'INSEE" target="_blank" href="/?page=avis&siret='.$siret.'">(Situation au répertoire SIRENE)</a>';
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Raison sociale & Coordonnées</h2>
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
//Nom
|
||||||
|
$title = '';
|
||||||
|
if(isset($etab['NomLong']) && $etab['NomLong']!='' && $etab['NomLong']!=$etab['Nom'] )
|
||||||
|
$title = $etab['NomLong'];
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
|
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
||||||
|
<?=$etab['Nom']; if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
//Forme juridique
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Forme juridique</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['FJ'].' : '.strWsToHtml($etab['FJ_lib']);?>
|
||||||
|
<?php
|
||||||
|
if(isset($etab['FJ2']) && $etab['FJ2']!='' && isset($etab['FJ2_Lib']) && $etab['FJ2_Lib']!='')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<img src="./img/exclamation.png" title="Forme jurique au RCS : <?=$etab['FJ2_Lib']?> (<?=$etab['FJ2']?>)"/>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
//Date d'immatriculation
|
||||||
|
$dateImmat = '';
|
||||||
|
if(isset($etab['DateImmat']) && $etab['DateImmat']!='' && $etab['DateImmat']!='0000-00-00'){
|
||||||
|
$dateImmat = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateImmat']));
|
||||||
|
}
|
||||||
|
if($dateImmat!=''){
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Date d'immatriculation</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$dateImmat?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
//Date de création de l'établissement
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Création de l'établissement</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
$dateCreationEt=str_replace('-','',$etab['DateCreaEt']);
|
||||||
|
if ($dateCreationEt*1<>0) {
|
||||||
|
if (substr($dateCreationEt,-2)*1==0)
|
||||||
|
echo WDate::dateT('Ymd', 'm/Y', $dateCreationEt);
|
||||||
|
else
|
||||||
|
echo WDate::dateT('Ymd', 'd/m/Y', $dateCreationEt);
|
||||||
|
} else echo 'N/C';
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Adresse</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
if($etab['AdresseRue'] == ''){ $voie = $etab['Adresse2']; }else{ $voie = $etab['AdresseRue']; }
|
||||||
|
?>
|
||||||
|
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[numVoie]=<?=urlencode($etab['AdresseNum'])?>&formR[voie]=<?=urlencode($voie)?>&formR[cpVille]=<?=urlencode($etab['CP'])?>" title="Rechercher à partir de cette adresse">
|
||||||
|
<p class="adresse"><?php print $etab['Adresse'];?></p>
|
||||||
|
<?php
|
||||||
|
if (preg_match('/CHEZ SOFRADOM/i',$etab['Adresse2']))
|
||||||
|
$etab['Adresse2']='<a title="Voir la fiche d\'identité du domiciliataire de cette entreprise" href="/?page=identite&siret=42495045900018&idEntreprise=6720043">CHEZ SOFRADOM</a>';
|
||||||
|
//http://extranet.devlocal.com/?page=identite&siret=42495045900018&idEntreprise=6720043
|
||||||
|
if ($etab['Adresse2']<>'')
|
||||||
|
print '<p class="adresse">'.$etab['Adresse2'].'</p>';
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
$cp=$etab['CP']*1;
|
||||||
|
if ($cp<>0)
|
||||||
|
print '<p class="adresse">'.$etab['CP'].' '.strWsToHtml($etab['Ville']).'</p>';
|
||||||
|
if ($etab['Pays']<>'' && strtoupper(substr($etab['Pays'],0,3))<>'FRA')
|
||||||
|
print '<p class="adresse">'.strWsToHtml($etab['Pays']).'</p>';
|
||||||
|
?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Activité(s) & Chiffre d'affaire</h2>
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
//Activité de l'entreprise
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Activité de l'entreprise</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
if ($etab['Activite']<>'' && !preg_match('/non pr(e|é)cis(e|é)/i',utf8_decode($etab['Activite']))) {
|
||||||
|
$texte=preg_replace_callback("/((?:[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, strWsToHtml($etab['Activite']));
|
||||||
|
echo $texte.' ('.$etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']).')';
|
||||||
|
} else
|
||||||
|
echo $etab['NafEnt'].' : '. strWsToHtml($etab['NafEntLib']);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
//NAF4
|
||||||
|
if (preg_match('/NAF4/i', $_SESSION['tabInfo']['pref']) && trim(@$etab['Naf4Ent'])<>'') {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Anciens codes NAF</td>
|
||||||
|
<td width="350" class="StyleInfoData"><b>Entr. : </b><?=$etab['Naf4Ent'].' - '. strWsToHtml($etab['Naf4EntLib']);?><br/><b>Étab. :</b> <?=$etab['Naf4Etab'].' - '. strWsToHtml($etab['Naf4EtabLib']);?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
//Origine du fond
|
||||||
|
if ( ($etab['OrigineCreation']*1>0 && $etab['OrigineCreation']*1<9) ||
|
||||||
|
$etab['OrigineCreation']=='A' || $etab['OrigineCreation']=='B' || $etab['OrigineCreation']=='C' ||
|
||||||
|
$etab['OrigineCreation']=='D' || $etab['OrigineCreation']=='E' )
|
||||||
|
{
|
||||||
|
$tabCreation=array( 'a1'=>'Création',
|
||||||
|
'a3'=>'Achat',
|
||||||
|
'a4'=>'Apport',
|
||||||
|
'a6'=>'Prise en location gérance',
|
||||||
|
'a7'=>'Partage',
|
||||||
|
'a8'=>'Reprise',
|
||||||
|
'aA'=>'Reprise globale de l\'exploitation agricole',
|
||||||
|
'aB'=>'Poursuite de l\'exploitation agricole par le conjoint',
|
||||||
|
'aC'=>'Transfert de propriété de l\'exploitation agricole',
|
||||||
|
'aD'=>'Apport d\'exploitation(s) agricole(s) individuelle(s)',
|
||||||
|
'aE'=>'Reprise d\'exploitation agricole individuelle',
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Origine du fonds</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$tabCreation['a'.$etab['OrigineCreation']]?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
//Chiffre d'affaire
|
||||||
|
$title = '';
|
||||||
|
if(isset($etab['Bilan']['CA'])) $title.='Chiffre d\'affaire de '.moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']);
|
||||||
|
if(isset($etab['Bilan']['Resultat'])) $title.=' et Résultat de '.moneyKM($etab['Bilan']['Resultat']).deviseText($etab['Bilan']['Devise']);
|
||||||
|
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Chiffre d'affaire</td>
|
||||||
|
<td width="350" class="StyleInfoData" title="<?=$title?>">
|
||||||
|
<?php
|
||||||
|
if(isset($etab['Bilan']['CA']) && (!isset($etab['TrancheCALib']) || $etab['TrancheCALib']=='N/C'))
|
||||||
|
{
|
||||||
|
print moneyKM($etab['Bilan']['CA']).deviseText($etab['Bilan']['Devise']).' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||||||
|
}elseif(isset($etab['TrancheCALib']) && $etab['TrancheCALib']!='N/C'){
|
||||||
|
print strWsToHtml($etab['TrancheCALib']);
|
||||||
|
}else{
|
||||||
|
print 'N/C';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
//Capital
|
||||||
|
if (isset($etab['Capital']) && $etab['Capital']*1>0)
|
||||||
|
{
|
||||||
|
$title = '';
|
||||||
|
if(isset($etab['Bilan']['Capital'])) $title.='Capital de '.moneyKM($etab['Bilan']['Capital']).deviseText($etab['Bilan']['Devise']);
|
||||||
|
if(isset($etab['Bilan']['Cloture'])) $title.=' au '.WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['Bilan']['Cloture']));
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Capital <?php if (isset($etab['CapitalType']) && $etab['CapitalType']=='V'){print 'variable';}?></td>
|
||||||
|
<td width="350" class="StyleInfoData" title="<?=$title?>"><?=number_format($etab['Capital'],0,',',' ')?>
|
||||||
|
<?php
|
||||||
|
if ($etab['CapitalDev']=='EUR') echo '€';
|
||||||
|
else {
|
||||||
|
echo $etab['CapitalDev'].' ('.strWsToHtml($etab['CapitalLib']).')';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
//Type d'exploitation
|
||||||
|
if ( isset($etab['TypeExploitation']) && $etab['TypeExploitation']!=0 )
|
||||||
|
{
|
||||||
|
$tabTypeExploitation = array(
|
||||||
|
1 => "Locataire du fond de commerce",
|
||||||
|
2 => "Loueur du fond de commerce",
|
||||||
|
3 => "Prestation de personnel",
|
||||||
|
10 => "Exploitation directe"
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Type d'exploitation</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$tabTypeExploitation[$etab['TypeExploitation']]?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Dirigeants</h2>
|
||||||
|
<?php
|
||||||
|
$dirs = scoresws_dirigeants($siret, $siren, $idEntreprise);
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td colspan="2" width="550" class="StyleInfoData">
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
if (count($dirs)>0)
|
||||||
|
{
|
||||||
|
foreach ($dirs as $i=>$dir)
|
||||||
|
{
|
||||||
|
$societe = str_replace('&#160;',' ', $dir['Societe']);
|
||||||
|
$nom = str_replace('&#160;',' ', $dir['Societe'].' '.$dir['Nom'].' '.$dir['Prenom']);
|
||||||
|
if(isset($dir['Civilite']) && $dir['Civilite']!=''){$nom = $dir['Civilite'].'. '.$nom;}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="StyleInfoData" width="120"><?php print $dir['Titre'];?></td>
|
||||||
|
<td class="StyleInfoData" width="200">
|
||||||
|
<?php
|
||||||
|
if($societe != ''){
|
||||||
|
?>
|
||||||
|
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[raisonSociale]=<?php print $societe;?>" title="Recherche à partir de la raison sociale">
|
||||||
|
<?php print $societe;?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($nom != ''){
|
||||||
|
?>
|
||||||
|
<a href="/?page=recherche&vue=list&formR[type]=dir&formR[dirNom]=<?php print $dir['Nom'];?>&formR[dirPrenom]=<?php print $dir['Prenom'];?>&formR[dirDateNaissJJ]=<?php print substr($dir['NaissDate'],0,2);?>&formR[dirDateNaissMM]=<?php print substr($dir['NaissDate'],3,2);?>&formR[dirDateNaissAAAA]=<?php print substr($dir['NaissDate'],6,4);?>" title="Recherche à partir du nom du dirigeant">
|
||||||
|
<?php print $nom;?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td class="StyleInfoData" width="230"><?
|
||||||
|
if (trim($dir['NaissDate'])<>'' && trim($dir['NaissVille'].' '.$dir['NaissDepPays'])<>'') {
|
||||||
|
echo 'né(e) le '.$dir['NaissDate'].' à '.$dir['NaissVille'];
|
||||||
|
if (trim($dir['NaissDepPays'])<>'')
|
||||||
|
echo ' ('.$dir['NaissDepPays'].')';
|
||||||
|
} elseif (trim($dir['NaissDate'])<>'') {
|
||||||
|
echo 'né(e) le '.$dir['NaissDate'];
|
||||||
|
} elseif (trim($dir['NaissVille'].' '.$dir['NaissDepPays'])<>'') {
|
||||||
|
echo 'né(e) à '.$dir['NaissVille'];
|
||||||
|
echo ' ('.$dir['NaissDepPays'].')';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<tr><td class="StyleInfoData" width="550"> Aucune donnée n\'est présente dans notre base</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Actionnaires</h2>
|
||||||
|
<?php
|
||||||
|
require_once 'partenaires/classMTva.php';
|
||||||
|
require_once 'partenaires/classMMap.php';
|
||||||
|
|
||||||
|
$liens = scoresws_liens($siret, $siren, $idEntreprise);
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td colspan="2" width="550" class="StyleInfoData">
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
if( ($_SESSION['tabInfo']['entrep']['fj']>=1000 && $_SESSION['tabInfo']['entrep']['fj']<=1999)
|
||||||
|
|| ($_SESSION['tabInfo']['entrep']['fj']>=10 && $_SESSION['tabInfo']['entrep']['fj']<=19) )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="550" colspan="2" class="StyleInfoData">Cette entreprise est une personne physique.</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (@count($liens['actionnaires'])>0)
|
||||||
|
{
|
||||||
|
foreach ($liens['actionnaires'] as $i=>$lien)
|
||||||
|
{
|
||||||
|
if ($lien['Actif']==0)
|
||||||
|
{
|
||||||
|
$font1='<font color="gray"><i>';
|
||||||
|
$font2='</i></font>';
|
||||||
|
} else
|
||||||
|
$font1=$font2='';
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="StyleInfoData" width="100">
|
||||||
|
<?php
|
||||||
|
echo $font1;
|
||||||
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
||||||
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
||||||
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
||||||
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
||||||
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
||||||
|
else echo ' ';
|
||||||
|
echo $font2;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="StyleInfoLib" width="300">
|
||||||
|
<?php
|
||||||
|
echo $font1;
|
||||||
|
echo utf8_decode($lien['RaisonSociale']);
|
||||||
|
echo $font2;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="StyleInfoData" width="150">
|
||||||
|
<?php
|
||||||
|
echo $font1;
|
||||||
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0) {
|
||||||
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
||||||
|
}
|
||||||
|
else ' ';
|
||||||
|
|
||||||
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']);
|
||||||
|
echo $font2;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
} //Fin pour chaque actionnaire
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="550" colspan="2" class="StyleInfoData">Aucun actionnaire référencé par nos services</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}//Fin test personne physique
|
||||||
|
?>
|
||||||
|
<tr><td colspan="3"> </td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Participations</h2>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td colspan="2" width="550" class="StyleInfoData">
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
if (@count($liens['participations'])>0)
|
||||||
|
{
|
||||||
|
foreach ($liens['participations'] as $i=>$lien)
|
||||||
|
{
|
||||||
|
if ($lien['Actif']==0) {
|
||||||
|
$font1='<font color="gray"><i>';
|
||||||
|
$font2='</i></font>';
|
||||||
|
} else
|
||||||
|
$font1=$font2='';
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="StyleInfoData" width="100">
|
||||||
|
<?php
|
||||||
|
echo $font1;
|
||||||
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
||||||
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
||||||
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
||||||
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
||||||
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
||||||
|
else echo ' ';
|
||||||
|
echo $font2;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="StyleInfoLib" width="300"><?
|
||||||
|
echo $font1;
|
||||||
|
echo utf8_decode($lien['RaisonSociale']);
|
||||||
|
echo $font2;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="StyleInfoData" width="150"><?
|
||||||
|
echo $font1;
|
||||||
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0) {
|
||||||
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
||||||
|
}
|
||||||
|
else ' ';
|
||||||
|
|
||||||
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']);
|
||||||
|
echo $font2;?></b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
} // Fin pour chaque participations
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="550" colspan="2" class="StyleInfoData">Aucune participation référencée par nos services</td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}//Fin conditions participations
|
||||||
|
?>
|
||||||
|
<tr><td colspan="3"> </td></tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Eléments Financiers</h2>
|
||||||
|
<?php
|
||||||
|
require_once 'ratios/ratios.php';
|
||||||
|
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||||||
|
$bilansInfos = $result['bilansInfos'];
|
||||||
|
$ratiosInfos = $result['ratiosInfos'];
|
||||||
|
$ratiosEntrep = $result['ratiosEntrep'];
|
||||||
|
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||||||
|
$ratiosSecteur = $result['ratiosSecteur'];
|
||||||
|
$dataActif = $result['dataActif'];
|
||||||
|
$dataPassif = $result['dataPassif'];
|
||||||
|
$dataSIG = $result['dataSIG'];
|
||||||
|
|
||||||
|
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
|
||||||
|
$numBilanN = $numBilan['N'];
|
||||||
|
$numBilanC = $numBilan['C'];
|
||||||
|
$numBilanB = $numBilan['B'];
|
||||||
|
$numBilanA = $numBilan['A'];
|
||||||
|
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG, $typeBilan);
|
||||||
|
$nbrAnnees = count($bilansInfos)-1;
|
||||||
|
$data = synthese_datagraphmin($bilansInfos, $ratiosEntrep);
|
||||||
|
$dataGraph = $data['graph'];
|
||||||
|
$dataEvol = $data['evol'];
|
||||||
|
?>
|
||||||
|
<table id="synthese">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align="center"></th>
|
||||||
|
<th class="date" colspan="2"><?php print synthese_formatdateCloture($bilansInfos, 2); ?></th>
|
||||||
|
<th class="date" colspan="2"><?php print synthese_formatdateCloture($bilansInfos, 1); ?></th>
|
||||||
|
<th class="date" colspan="2"><?php print synthese_formatdateCloture($bilansInfos, 0); ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?=synthese_tablerowmin($ratiosInfos, $dataEvol)?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Paiements</h2>
|
||||||
|
<p>Aucun retard de paiement significatif n'a été porté à notre connaissance par l'ensemble de nos partenaires.</p>
|
||||||
|
|
||||||
|
<h2>Procédures collectives</h2>
|
||||||
|
<table>
|
||||||
|
<?php
|
||||||
|
//Situation Jurique + affichage date de radiation
|
||||||
|
$dateRadiation = '';
|
||||||
|
if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){
|
||||||
|
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation']));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Situation juridique</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
//Procédure collective
|
||||||
|
if ($etab['SituationJuridique']=='P')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">
|
||||||
|
<font color="red"><b>En procédure collective</b></font>
|
||||||
|
</a>
|
||||||
|
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?>
|
||||||
|
<?php
|
||||||
|
}/*else{
|
||||||
|
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
|
||||||
|
}*/
|
||||||
|
//Radiation
|
||||||
|
elseif($etab['SituationJuridique']=='RR')
|
||||||
|
{
|
||||||
|
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
||||||
|
}elseif($etab['SituationJuridique']=='RP'){
|
||||||
|
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
|
||||||
|
}else{
|
||||||
|
?>Aucune procédure enregistrée à ce jour par nos services.<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
// Fin Situation juridique
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Scores et encours</h2>
|
||||||
|
<?php
|
||||||
|
require_once 'partenaires/classMCoface.php';
|
||||||
|
|
||||||
|
$etab = scoresws_indiscore($siret, $siren, $idEntreprise);
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Score Conan Holder</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['scores']['ConanH']?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Score Afdcc 2</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['scores']['Afdcc2']?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Score Z</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['scores']['Z']?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">IndiScore</td>
|
||||||
|
<td width="350" class="StyleInfoData"><?=$etab['Indiscore']?> (<?=$etab['TendanceIndiscore']?>)</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Encours conseillé</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php
|
||||||
|
if($etab['infoEncours']!='' && !is_numeric($etab['encours']) && $etab['encours']=='N/A'){ ?>
|
||||||
|
<h3><?php print $etab['infoEncours'];?></h3>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
if ($etab['Indiscore']!=0) { ?>
|
||||||
|
<h3><?=round($etab['encours']/1000)?> K€</h3>
|
||||||
|
<?php } ?>
|
||||||
|
<h3><?php print $etab['infoEncours'];?></h3>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
@ -23,7 +23,9 @@ elseif (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité');
|
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité');
|
||||||
}else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (isset($_REQUEST['frmSaisie'])) $tabSaisie = $_REQUEST['frmSaisie'];
|
if (isset($_REQUEST['frmSaisie'])) $tabSaisie = $_REQUEST['frmSaisie'];
|
||||||
if (isset($_REQUEST['jugement'])) $tabJugement = $_REQUEST['jugement'];
|
if (isset($_REQUEST['jugement'])) $tabJugement = $_REQUEST['jugement'];
|
||||||
if (isset($_REQUEST['actionnaire'])) $tabActionna = $_REQUEST['actionnaire'];
|
if (isset($_REQUEST['actionnaire'])) $tabActionna = $_REQUEST['actionnaire'];
|
||||||
@ -93,7 +95,8 @@ elseif (
|
|||||||
}
|
}
|
||||||
} else $message='';
|
} else $message='';
|
||||||
|
|
||||||
if ($tabSaisie['action']=='sauver') {
|
if ($tabSaisie['action']=='sauver')
|
||||||
|
{
|
||||||
//Vente et Cession evénement 5500
|
//Vente et Cession evénement 5500
|
||||||
if(isset($perimetreVente) && count($perimetreVente)>0){
|
if(isset($perimetreVente) && count($perimetreVente)>0){
|
||||||
$tabJugement['even'] = array_merge($tabJugement['even'],$perimetreVente);
|
$tabJugement['even'] = array_merge($tabJugement['even'],$perimetreVente);
|
||||||
@ -109,7 +112,7 @@ elseif (
|
|||||||
if($countEtab>10) break;
|
if($countEtab>10) break;
|
||||||
if(count($etablissement5500)>$countEtab){ $txtEtab.=', '; }
|
if(count($etablissement5500)>$countEtab){ $txtEtab.=', '; }
|
||||||
}
|
}
|
||||||
if (count($etablissement5500)>1) { $txt = 'Etablissment(s) concerné(s) : '; }else{ $txt = 'Etablissment concerné : '; }
|
if (count($etablissement5500)>1) { $txt = 'Etablissement(s) concerné(s) : '; }else{ $txt = 'Etablissement concerné : '; }
|
||||||
if ($tabJugement['comp']!='')
|
if ($tabJugement['comp']!='')
|
||||||
$tabJugement['comp'].= ' '.$txt.$txtEtab;
|
$tabJugement['comp'].= ' '.$txt.$txtEtab;
|
||||||
else
|
else
|
||||||
@ -121,12 +124,12 @@ elseif (
|
|||||||
if( isset($txtEtab) && $txtEtab!='' )
|
if( isset($txtEtab) && $txtEtab!='' )
|
||||||
$tabJugement['comp'].= ', '.$etabnic;
|
$tabJugement['comp'].= ', '.$etabnic;
|
||||||
else
|
else
|
||||||
$tabJugement['comp'] = 'Etablissment concerné : '.$etabnic;
|
$tabJugement['comp'].= 'Etablissement concerné : '.$etabnic;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $tabJugement['oppo'] == 'adresse'){
|
if( $tabJugement['oppo'] == 'adresse'){
|
||||||
if ($tabJugement['comp']!='')
|
if ($tabJugement['comp']!='')
|
||||||
$tabJugement['comp'] = $tabJugement['comp'].' Opposition : A l\'adresse du bien vendu';
|
$tabJugement['comp'] .= ' Opposition : A l\'adresse du bien vendu';
|
||||||
else
|
else
|
||||||
$tabJugement['comp'] = 'Opposition : A l\'adresse du bien vendu';
|
$tabJugement['comp'] = 'Opposition : A l\'adresse du bien vendu';
|
||||||
}
|
}
|
||||||
@ -377,63 +380,73 @@ foreach ($liste as $code=>$lib) {
|
|||||||
|
|
||||||
<label>Évènement / Jugement <font color="Red">*</font></label>
|
<label>Évènement / Jugement <font color="Red">*</font></label>
|
||||||
<?php
|
<?php
|
||||||
if (!isset($_REQUEST['event']) || $_REQUEST['event']==''){
|
if (!isset($_REQUEST['event']) || $_REQUEST['event']==''){
|
||||||
$event = '0000';
|
$event = '0000';
|
||||||
}else{
|
}else{
|
||||||
$event = $_REQUEST['event'];
|
$event = $_REQUEST['event'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tabEvent = array(
|
||||||
|
'1100' => 'Ouverture sauvegarde',
|
||||||
|
'1200' => 'Redressement Judiciaire',
|
||||||
|
'1201' => 'Conversion sauvegarde en Redressement Judiciaire',
|
||||||
|
'1300' => 'Conversion Redressement Judiciaire en Liquidation Judiciaire',
|
||||||
|
'1301' => 'Ouverture Liquidation Judiciaire',
|
||||||
|
'1302' => 'Ouverture Liquidation Judiciaire Simplifiée',
|
||||||
|
'1303' => 'Ouverture Liquidation Judiciaire sur résolution du plan',
|
||||||
|
'1304' => 'Réouverture Liquidation Judiciaire',
|
||||||
|
'1305' => 'Liquidation Judiciaire',
|
||||||
|
'1306' => 'Liquidation Judiciaire simplifiée',
|
||||||
|
'1307' => 'Conversion sauvegarde en Liquidation Judiciaire',
|
||||||
|
'1308' => 'Fin du régime de Liquidation Judiciaire Simplifiée',
|
||||||
|
'1309' => 'Conversion Liquidation Judiciaire en Liquidation Judiciaire Simplifiée',
|
||||||
|
'1310' => 'Procédure d\'insolvabilité européenne',
|
||||||
|
'1311' => 'Liquidation Judiciaire par extension au(x) gérant(s)',
|
||||||
|
'1312' => 'Liquidation Judiciaire avec continuation d\'exploitation',
|
||||||
|
'1408' => 'Modification du plan de cession',
|
||||||
|
'1411' => 'Arrêt du plan de cession',
|
||||||
|
'1412' => 'Arrêt du plan de cession partielle',
|
||||||
|
'1413' => 'Arrêt du plan de continuation',
|
||||||
|
'1414' => 'Arrêt du plan de redressement',
|
||||||
|
'1415' => 'Prolongement du plan de cession',
|
||||||
|
'1511' => 'Résolution du plan de cession',
|
||||||
|
'1503' => 'Clôture de la procédure pour insuffisance d\'actif',
|
||||||
|
'1512' => 'Résolution du plan de continuation',
|
||||||
|
'1600' => 'Faillite personnelle',
|
||||||
|
'1601' => 'Interdiction de gérer',
|
||||||
|
'1999' => 'Autre procédure collective',
|
||||||
|
'2102' => 'Augmentation du capital social',
|
||||||
|
'2100' => 'Diminution du capital social',
|
||||||
|
'2202' => 'Dissolution',
|
||||||
|
'2206' => 'Mise en sommeil',
|
||||||
|
'2319' => 'Poursuite de l\'activité malgré perte > moitié du capital social',
|
||||||
|
'2315' => 'Modification de l\'administration',
|
||||||
|
'2313' => 'Modification de l\'activité',
|
||||||
|
'2305' => 'Modification de la dénomination',
|
||||||
|
'2307' => 'Modification de la forme juridique',
|
||||||
|
'2303' => 'Modification de la date de clôture de l\'exercice',
|
||||||
|
'2306' => 'Modification de la durée de la société',
|
||||||
|
'2901' => 'Transfert de siège',
|
||||||
|
'5500' => 'Vente/cession : Entreprise réalisant la vente',
|
||||||
|
'6700' => 'Radiation',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<select id="jugement" name="jugement[even][]" multiple size="5">
|
<select id="jugement" name="jugement[even][]" multiple size="5">
|
||||||
<option value="0000">-</option>
|
<option value="0000">-</option>
|
||||||
|
<?php
|
||||||
<option value="1100">Ouverture sauvegarde</option>
|
//Tri des libéllées par ordre alphabétique
|
||||||
<option value="1200">Redressement Judiciaire</option>
|
asort($tabEvent);
|
||||||
<option value="1201">Conversion sauvegarde en Redressement Judiciaire</option>
|
//Affichage
|
||||||
|
foreach($tabEvent as $key => $event)
|
||||||
<option value="1300">Conversion Redressement Judiciaire en Liquidation Judiciaire</option>
|
{
|
||||||
<option value="1301">Ouverture Liquidation Judiciaire</option>
|
?>
|
||||||
<option value="1302">Ouverture Liquidation Judiciaire Simplifiée</option>
|
<option value="<?=$key?>"><?=$event?></option>
|
||||||
<option value="1303">Ouverture Liquidation Judiciaire sur résolution du plan</option>
|
<?php
|
||||||
<option value="1304">Réouverture Liquidation Judiciaire</option>
|
}
|
||||||
<option value="1305">Liquidation Judiciaire</option>
|
?>
|
||||||
<option value="1306">Liquidation Judiciaire simplifiée</option>
|
|
||||||
<option value="1307">Conversion sauvegarde en Liquidation Judiciaire</option>
|
|
||||||
<option value="1308">Fin du régime de Liquidation Judiciaire Simplifiée</option>
|
|
||||||
<option value="1309">Conversion Liquidation Judiciaire en Liquidation Judiciaire Simplifiée</option>
|
|
||||||
<option value="1310">Procédure d'insolvabilité européenne</option>
|
|
||||||
<option value="1311">Liquidation Judiciaire par extension au(x) gérant(s)</option>
|
|
||||||
<option value="1312">Liquidation Judiciaire avec continuation d'exploitation</option>
|
|
||||||
|
|
||||||
<option value="1413">Arrêt du plan de continuation</option>
|
|
||||||
<option value="1414">Arrêt du plan de redressement</option>
|
|
||||||
|
|
||||||
<option value="1503">Clôture de la procédure pour insuffisance d'actif</option>
|
|
||||||
<option value="1512">Résolution du plan de continuation</option>
|
|
||||||
|
|
||||||
<option value="1600">Faillite personnelle</option>
|
|
||||||
<option value="1601">Interdiction de gérer</option>
|
|
||||||
|
|
||||||
<option value="1999">Autre procédure collective</option>
|
|
||||||
|
|
||||||
<option value="2319">Poursuite de l'activité malgré perte > moitié du capital social</option>
|
|
||||||
<option value="2315">Modification de l'administration</option>
|
|
||||||
<option value="2313">Modification de l'activité</option>
|
|
||||||
<option value="2305">Modification de la dénomination</option>
|
|
||||||
<option value="2307">Modification de la forme juridique</option>
|
|
||||||
<option value="2303">Modification de la date de clôture de l'exercice</option>
|
|
||||||
<option value="2306">Modification de la durée de la société</option>
|
|
||||||
|
|
||||||
<option value="2102">Augmentation du capital social</option>
|
|
||||||
<option value="2100">Diminution du capital social</option>
|
|
||||||
|
|
||||||
<option value="2901">Transfert de siège</option>
|
|
||||||
|
|
||||||
<option value="5500">Vente/cession : Entreprise réalisant la vente</option>
|
|
||||||
|
|
||||||
<option value="2202">Dissolution</option>
|
|
||||||
<option value="2206">Mise en sommeil</option>
|
|
||||||
|
|
||||||
<option value="6700">Radiation</option>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<div id="subFormSaisie">
|
<div id="subFormSaisie">
|
||||||
|
@ -5,6 +5,15 @@ $siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
|||||||
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
|
/** Déclation du client Soap auprès du webservice **/
|
||||||
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
|
'soap_version' => SOAP_1_1,
|
||||||
|
'location' => 'http://78.31.45.206/ws/',
|
||||||
|
'uri' => 'http://78.31.45.206/',
|
||||||
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
|
'password' => $_SESSION['tabInfo']['password']
|
||||||
|
));
|
||||||
|
|
||||||
if (!$_SESSION['connected'])
|
if (!$_SESSION['connected'])
|
||||||
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||||
else {
|
else {
|
||||||
@ -19,6 +28,8 @@ else {
|
|||||||
) $ref='*';
|
) $ref='*';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
$O = $client->getListeFichierSurv($_SESSION['tabInfo']['login'], $ref, $nomFic);
|
$O = $client->getListeFichierSurv($_SESSION['tabInfo']['login'], $ref, $nomFic);
|
||||||
$tabFichier=$O['results'];
|
$tabFichier=$O['results'];
|
||||||
} catch (SoapFault $fault) {
|
} catch (SoapFault $fault) {
|
||||||
|
@ -2,6 +2,18 @@
|
|||||||
require_once 'common/dates.php';
|
require_once 'common/dates.php';
|
||||||
require_once 'common/curl.php';
|
require_once 'common/curl.php';
|
||||||
|
|
||||||
|
/** Déclation du client Soap auprès du webservice **/
|
||||||
|
/** Déclation du client Soap auprès du webservice **/
|
||||||
|
$client = new SoapClient(null, array( 'trace' => 1,
|
||||||
|
'soap_version' => SOAP_1_1,
|
||||||
|
'location' => 'http://78.31.45.206/ws/',
|
||||||
|
'uri' => 'http://78.31.45.206/',
|
||||||
|
'login' => $_SESSION['tabInfo']['login'],
|
||||||
|
'password' => $_SESSION['tabInfo']['password']
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!$_SESSION['connected'])
|
if (!$_SESSION['connected'])
|
||||||
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
||||||
else{
|
else{
|
||||||
@ -36,7 +48,7 @@ else{
|
|||||||
require_once 'soaperror.php';
|
require_once 'soaperror.php';
|
||||||
processSoapFault($client,$fault,$tabInfo);
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
}
|
}
|
||||||
$page = getUrl(WEBSERVICE_URI.'csv/'.$nomFic.'.bz2', '', '', '', false);
|
$page = getUrl('http://78.31.45.206/csv/'.$nomFic.'.bz2', '', '', '', false);
|
||||||
$body = $page['body'];
|
$body = $page['body'];
|
||||||
$fp=@fopen($file2, 'w');
|
$fp=@fopen($file2, 'w');
|
||||||
@fwrite($fp, $body);
|
@fwrite($fp, $body);
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!$_SESSION['connected']) die();
|
if (!$_SESSION['connected']) die();
|
||||||
|
|
||||||
require_once 'cache/cache.php';
|
|
||||||
require_once 'ratios/ratios.php';
|
|
||||||
|
|
||||||
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
||||||
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
||||||
|
|
||||||
@ -12,70 +9,33 @@ if (($siret*1)==0 && $idEntreprise==0) die('Param
|
|||||||
$siren=substr($siret,0,9);
|
$siren=substr($siret,0,9);
|
||||||
|
|
||||||
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
isset($_REQUEST['ratio'])? $ratio=$_REQUEST['ratio'] : $ratio='';
|
||||||
|
isset($_REQUEST['type']) ? $typeBilan=$_REQUEST['type'] : $typeBilan='' ;
|
||||||
|
|
||||||
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
|
require_once 'cache/cache.php';
|
||||||
}else{ $fileName = $page2.'-'.$siret; }
|
require_once 'ratios/ratios.php';
|
||||||
if($ratio!=''){$fileName.='-'.$ratio;}
|
require_once 'scoresws/scoresws.php';
|
||||||
cache_filename($fileName);
|
|
||||||
|
|
||||||
$ratiosEntrep = array();
|
$result = scoresws_ratios($siret, $siren, $idEntreprise);
|
||||||
$ratiosInfos = array();
|
$bilansInfos = $result['bilansInfos'];
|
||||||
$bilansInfos = array();
|
$ratiosInfos = $result['ratiosInfos'];
|
||||||
$ratiosEntrepEvol = array();
|
$ratiosEntrep = $result['ratiosEntrep'];
|
||||||
|
$ratiosEntrepEvol = $result['ratiosEntrepEvol'];
|
||||||
|
$ratiosSecteur = $result['ratiosSecteur'];
|
||||||
|
|
||||||
if( cache_exist() && !( preg_match('/saisie/i', $_SESSION['tabInfo']['droits']) || $_SESSION['tabInfo']['mode_edition']==1 ) ){
|
$firephp->log($bilansInfos,'bilansInfos');
|
||||||
$ratiosEntrep = cache_get('ratiosEntrep');
|
|
||||||
$ratiosInfos = cache_get('ratiosInfos');
|
|
||||||
$bilansInfos = cache_get('bilansInfos');
|
|
||||||
$ratiosEntrepEvol = cache_get('ratiosEntrepEvol');
|
|
||||||
$firephp->log($ratiosEntrepEvol,'ratiosEntrepEvol');
|
|
||||||
}else{
|
|
||||||
try {
|
|
||||||
$O = $client->getRatios($siren, 'synthese');
|
|
||||||
$bilansInfos = $O['result']['BilansInfos'];
|
|
||||||
$ratiosInfos = $O['result']['RatiosInfos'];
|
|
||||||
$ratiosEntrep = $O['result']['RatiosEntrep'];
|
|
||||||
$ratiosEntrepEvol = $O['result']['RatiosEntrepEvol'];
|
|
||||||
cache_delete();
|
|
||||||
cache_add('ratiosEntrep',$ratiosEntrep);
|
|
||||||
cache_add('bilansInfos',$bilansInfos);
|
|
||||||
cache_add('ratiosInfos',$ratiosInfos);
|
|
||||||
cache_add('ratiosEntrepEvol',$ratiosEntrepEvol);
|
|
||||||
}catch (SoapFault $fault) {
|
|
||||||
require_once 'soaperror.php';
|
|
||||||
processSoapFault($client,$fault,$_SESSION['tabInfo']);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Liste des ratios pour le graphique général
|
list($typeBilan, $numBilan) = countBilans($bilansInfos, $typeBilan);
|
||||||
$tabRatioGraph = array( 0 => array('ratio'=>'r236', 'op' => 1000),
|
$numBilanN = $numBilan['N'];
|
||||||
1 => array('ratio'=>'r235', 'op' => 1000),
|
$numBilanC = $numBilan['C'];
|
||||||
2 => array('ratio'=>'r6', 'op' => 1000),
|
$numBilanB = $numBilan['B'];
|
||||||
3 => array('ratio'=>'r146', 'op' => 1000));
|
$numBilanA = $numBilan['A'];
|
||||||
|
list($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, $dataActif, $dataPassif, $dataSIG) = filtreTypeBilans($bilansInfos, $ratiosEntrep, $ratiosEntrepEvol, $ratiosSecteur, array(), array(), array(), $typeBilan);
|
||||||
//Liste des ratios à afficher
|
$nbrAnnees = count($bilansInfos)-1;
|
||||||
$tabRatio = array(
|
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $ratio);
|
||||||
'r5' => array('evol'=>'r6', 'op' => 1000, 'titre'=>'CHIFFRE D\'AFFAIRES'),
|
|
||||||
'r7' => array('evol'=>'r8', 'op' => 1000, 'titre'=>'RESULTAT COURANT AVANT IMPOTS'),
|
|
||||||
'r10' => array('evol'=>'r11', 'op' => 1000, 'titre'=>'RESULTAT NET'),
|
|
||||||
'r18' => array('evol'=>'r19', 'op' => 1000, 'titre'=>'FONDS PROPRES'),
|
|
||||||
'r22' => array('evol'=>'r23', 'op' => 1000, 'titre'=>'TOTAL BILAN'),
|
|
||||||
'r231' => array('evol'=>'r235', 'op' => 1000, 'titre'=>'FONDS DE ROULEMENT'),
|
|
||||||
'r232' => array('evol'=>'r236', 'op' => 1000, 'titre'=>'BESOIN EN FONDS DE ROULEMENT'),
|
|
||||||
'r62' => array('evol'=>'r64', 'op' => 1000, 'titre'=>'TRESORERIE'),
|
|
||||||
'r24' => array('evol'=>'r24', 'op' => 1, 'titre'=>'EFFECTIF', 'unite' => 1),
|
|
||||||
);
|
|
||||||
|
|
||||||
//On souhaite n'afficher qu'un seul ratio, on réduit donc le tableau
|
|
||||||
if($ratio!=''){
|
|
||||||
$tabRatio = array( $ratio => $tabRatio[$ratio]);
|
|
||||||
}
|
|
||||||
$data = synthese_datagraph($bilansInfos, $ratiosEntrep, $tabRatioGraph, $tabRatio);
|
|
||||||
$dataGraph = $data['graph'];
|
$dataGraph = $data['graph'];
|
||||||
$dataEvol = $data['evol'];
|
$dataEvol = $data['evol'];
|
||||||
|
|
||||||
$firephp->log($dataEvol, 'evol');
|
$firephp->log($bilansInfos,'bilansInfos');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
@ -92,10 +52,26 @@ $firephp->log($dataEvol, 'evol');
|
|||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
<td width="340" class="StyleInfoData"><?=$_SESSION['tabInfo']['entrep']['raisonSociale'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (count($ratiosEntrep)==0 || !isset($ratiosEntrep))
|
if ( $numBilanN>0 || $numBilanC>0 )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Type de bilans</td>
|
||||||
|
<td width="340" class="StyleInfoData">
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=N" <?=($typeBilan=='N')? 'checked' : '';?>/><label>Réel normal ou Simplifié</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC>0){ ?><input type="radio" name="typeBilan" value="index.php?page=<?=$page?>&siret=<?=$siret?>&idEntreprise=<?=$idEntreprise?>&type=C" <?=($typeBilan=='C')? 'checked' : '';?>/><label>Consolidé</label><?php }?>
|
||||||
|
<?php if($numBilanN>0 && $numBilanC==0){ ?>Réel normal ou Simplifié<?php }?>
|
||||||
|
<?php if($numBilanN==0 && $numBilanC>0){ ?>Consolidé<?php }?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
if ($numBilanN==0 && $numBilanC==0 && $numBilanB==0 && $numBilanA==0)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
@ -103,10 +79,17 @@ if (count($ratiosEntrep)==0 || !isset($ratiosEntrep))
|
|||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
elseif($numBilanN==0 && $numBilanC==0 && ($numBilanB>0 || $numBilanA>0) )
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<table>
|
||||||
|
<tr><td width="30"> </td><td><b>Bilan de banque/assurance non gérés</b></td></tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table id="synthese">
|
<table id="synthese">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -121,7 +104,8 @@ else
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
print synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio)
|
//TODO : Afficher ligne par ligne les éléments
|
||||||
|
print synthese_tablerow($ratiosInfos, $dataEvol, $ratio);
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -131,6 +115,10 @@ print synthese_tablerow($ratiosInfos, $dataEvol, $tabRatio)
|
|||||||
if(count($tabRatio)==1){ ?>
|
if(count($tabRatio)==1){ ?>
|
||||||
<div id="titreEvol"><b>Evolution</b></div>
|
<div id="titreEvol"><b>Evolution</b></div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if( ($siret*1)==0 || ($siren*1)<100 ){ $fileName = 'synthese-'.$idEntreprise;}
|
||||||
|
else{ $fileName = 'synthese-'.$siret; }
|
||||||
|
if($ratio!=''){ $fileName.='-'.$ratio; }
|
||||||
if(count($dataEvol[$ratio])<=1){
|
if(count($dataEvol[$ratio])<=1){
|
||||||
print "Les informations sont insuffisantes pour générer la courbe d'évolution";
|
print "Les informations sont insuffisantes pour générer la courbe d'évolution";
|
||||||
}else{?>
|
}else{?>
|
||||||
@ -142,7 +130,7 @@ if(count($tabRatio)==1){ ?>
|
|||||||
if(count($dataGraph)<=1){
|
if(count($dataGraph)<=1){
|
||||||
print '<div id="graphInfo">Les informations sont insuffisantes pour générer le graphique de synthèse</div>';
|
print '<div id="graphInfo">Les informations sont insuffisantes pour générer le graphique de synthèse</div>';
|
||||||
}else{
|
}else{
|
||||||
print synthese_graph_linecompare($dataGraph, $fileName);
|
print synthese_graph_linecompare($dataGraph);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
25
www/pages_saisie/event_1408.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-Type: text/html; charset=ISO-8859-1');
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="./js/thickbox.js"></script>
|
||||||
|
<label>Date de jouissance / effet :</label>
|
||||||
|
<input type="text" maxlength="10" class="date" name="jugement[dateFinPeriode]" value="" />
|
||||||
|
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||||
|
<label>Date cessation de paiement </label>
|
||||||
|
<input type="text" class="date" name="jugement[datePaie]" size="10" maxlength="10" value="" />
|
||||||
|
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||||
|
<label>Audience de renvoi le </label>
|
||||||
|
<input type="text" class="date" name="jugement[dateAudienceRenvoi]" size="10" maxlength="10" value="" />
|
||||||
|
<span class="left">(Format JJ/MM/AAAA)</span>
|
||||||
|
<label>Nom de l'acheteur</label>
|
||||||
|
<input type="text" name="jugement[AcheteurNom]" size="70" maxlength="100" value="" />
|
||||||
|
<label>SIREN de l'acheteur</label>
|
||||||
|
<input type="text" name="jugement[AcheteurSiren]" size="70" maxlength="11" value="" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".date").blur(function() {
|
||||||
|
//Test du format date
|
||||||
|
$(this).val(dateInputFormat($(this).val()));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|