Compare commits
126 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
55e2ac9fd0 | ||
|
85f238b0cb | ||
|
b55afbae1a | ||
|
9c97dcb57d | ||
|
13950bc000 | ||
|
ddd2a64451 | ||
|
afc44019df | ||
|
08183d30fe | ||
|
886ef055ac | ||
|
aeec1e28ec | ||
|
f0bd69941f | ||
|
859ad54222 | ||
|
65045af11c | ||
|
cf89b3cb20 | ||
|
52e6a25e9e | ||
|
c5bbe9ddf2 | ||
|
2a0af60fd9 | ||
|
8e5e54e831 | ||
|
1637c988f1 | ||
|
167221cc8f | ||
|
f42f84222a | ||
|
cc891e2077 | ||
|
f5a8d55d0f | ||
|
ee1e16fc2f | ||
|
fee5d07d37 | ||
|
6248c7c737 | ||
|
ff8d4f5068 | ||
|
7f3bb2c3fb | ||
|
ca541cb6c7 | ||
|
5b0bb9a1c3 | ||
|
327a1d386b | ||
|
3870bcd2ff | ||
|
3d3a231b27 | ||
|
5054f54b3e | ||
|
89668f1b84 | ||
|
5f42aeb845 | ||
|
a73f9c7b05 | ||
|
03c6a7f37f | ||
|
58becead4b | ||
|
ec8d2e31bb | ||
|
0d24d222f8 | ||
|
8f687497e4 | ||
|
35734dc7f4 | ||
|
42d67f7cff | ||
|
9683f87b86 | ||
|
0f1176e861 | ||
|
d1c46cc1e0 | ||
|
5dfb7f42d2 | ||
|
f7763a5404 | ||
|
eaddebacdb | ||
|
0222b6d629 | ||
|
56dfbb11b0 | ||
|
1c85624ddd | ||
|
eb9d909fe6 | ||
|
f4af6cfa04 | ||
|
af8f61627e | ||
|
d47f37913e | ||
|
34eef2cdab | ||
|
48ac6b64c3 | ||
|
3b5c391c70 | ||
|
d945f9d2b3 | ||
|
5a2acfd4a9 | ||
|
9b211e5fbd | ||
|
71e5c21944 | ||
|
48a7edca78 | ||
|
6cd9530590 | ||
|
5d091a42cd | ||
|
1e5b034c81 | ||
|
97950e3b43 | ||
|
c803660586 | ||
|
c836ba4415 | ||
|
25c0ad7fa8 | ||
|
41fc7d04dd | ||
|
8602789f7c | ||
|
b0a6545244 | ||
|
95aa4ccb41 | ||
|
fb1ddb3a8a | ||
|
826e4c2837 | ||
|
b14ee7e820 | ||
|
bc049110f0 | ||
|
85acc7ab8b | ||
|
1bfca65f98 | ||
|
99e1314b30 | ||
|
e7acd8f1ca | ||
|
4df64f60bb | ||
|
66a3b144af | ||
|
a8769d8a87 | ||
|
6c18902167 | ||
|
d48f167e38 | ||
|
b3e23b640f | ||
|
f802ce0381 | ||
|
40d41a4a79 | ||
|
e75ba037c1 | ||
|
13bf40727c | ||
|
0784096e2f | ||
|
7860bfde5d | ||
|
ea2a215a53 | ||
|
4204240625 | ||
|
1f59a0929f | ||
|
c419d0d045 | ||
|
32fda6256e | ||
|
9f2f33a6b8 | ||
|
aef8f4d490 | ||
|
8860fa194a | ||
|
a78555bb77 | ||
|
c6f424a647 | ||
|
7b21b8322b | ||
|
bf821e1cb5 | ||
|
27390fce4e | ||
|
4532846921 | ||
|
5161eb4ed8 | ||
|
431d0163a9 | ||
|
5990a1b39a | ||
|
f842647cf6 | ||
|
3e4686fda0 | ||
|
dcc2b1767d | ||
|
13dc262ba0 | ||
|
ee763e8c49 | ||
|
27548d988a | ||
|
b049cd2671 | ||
|
a848819181 | ||
|
11ab5c993e | ||
|
d03c450bc7 | ||
|
4495b356a9 | ||
|
efe13d9b24 | ||
|
442df60e0b |
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'Bootstrap' => dirname(__FILE__) . '//Bootstrap.php',
|
||||
'DemoController' => dirname(__FILE__) . '//controllers/DemoController.php',
|
||||
'DocumentationController' => dirname(__FILE__) . '//controllers/DocumentationController.php',
|
||||
'ErrorController' => dirname(__FILE__) . '//controllers/ErrorController.php',
|
||||
'ExportController' => dirname(__FILE__) . '//controllers/ExportController.php',
|
||||
'FichierController' => dirname(__FILE__) . '//controllers/FichierController.php',
|
||||
'ImportController' => dirname(__FILE__) . '//controllers/ImportController.php',
|
||||
'IndexController' => dirname(__FILE__) . '//controllers/IndexController.php',
|
||||
'JsonrpcController' => dirname(__FILE__) . '//controllers/JsonrpcController.php',
|
||||
'RefController' => dirname(__FILE__) . '//controllers/RefController.php',
|
||||
'ServiceController' => dirname(__FILE__) . '//controllers/ServiceController.php',
|
||||
'UserController' => dirname(__FILE__) . '//controllers/UserController.php',
|
||||
'Zend_View_Helper_DocComplement' => dirname(__FILE__) . '//views/helpers/DocComplement.php',
|
||||
'Zend_View_Helper_DocDescription' => dirname(__FILE__) . '//views/helpers/DocDescription.php',
|
||||
'Zend_View_Helper_DocExemple' => dirname(__FILE__) . '//views/helpers/DocExemple.php',
|
||||
'Zend_View_Helper_DocMethod' => dirname(__FILE__) . '//views/helpers/DocMethod.php',
|
||||
'Zend_View_Helper_DocParameter' => dirname(__FILE__) . '//views/helpers/DocParameter.php',
|
||||
'Zend_View_Helper_DocReturn' => dirname(__FILE__) . '//views/helpers/DocReturn.php',
|
||||
'Zend_View_Helper_ProfileLink' => dirname(__FILE__) . '//views/helpers/ProfileLink.php',
|
||||
);
|
@ -161,4 +161,29 @@ class FichierController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
public function crmAction()
|
||||
{
|
||||
$c = Zend_Registry::get('config');
|
||||
$directory = $c->profil->path->files;
|
||||
|
||||
$fichier = $this->getRequest()->getParam('fichier');
|
||||
|
||||
$content_type = 'application/x-bzip';
|
||||
// --- Envoi du fichier sur la sortie standard
|
||||
$filepath = $directory.'/'.$fichier;
|
||||
if ( file_exists($filepath) ) {
|
||||
header('Content-Transfer-Encoding: none');
|
||||
header('Content-type: ' . $content_type.'');
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
header('Content-MD5: ' . base64_encode(md5_file($filepath)));
|
||||
header('Content-Disposition: filename="' . basename($filepath) . '"');
|
||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
||||
header('Pragma: public');
|
||||
ini_set('zlib.output_compression', '0');
|
||||
echo file_get_contents($filepath);
|
||||
} else {
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -100,10 +100,6 @@ apt-get install php-apc
|
||||
apt-get install php5-curl
|
||||
apt-get install php5-xmlrpc
|
||||
|
||||
Paquet PEAR
|
||||
- Mail
|
||||
- Mail_Mime
|
||||
|
||||
WKHTMLTOPDF
|
||||
===========
|
||||
apt-get install libXrender1
|
||||
|
@ -24,7 +24,8 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
|
||||
|| ( $controller == 'fichier' && $action == 'kbis' )
|
||||
|| ( $controller == 'fichier' && $action == 'csv' )
|
||||
|| ( $controller == 'fichier' && $action == 'associations' )
|
||||
|| ( $controller == 'fichier' && $action == 'greffes' )) {
|
||||
|| ( $controller == 'fichier' && $action == 'greffes' )
|
||||
|| ( $controller == 'fichier' && $action == 'crm' )) {
|
||||
$checkAuth = false;
|
||||
}
|
||||
|
||||
|
6
library/Application/Model/JoAssoStatut.php
Normal file
6
library/Application/Model/JoAssoStatut.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class Application_Model_JoAssoStatut extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'asso_statut';
|
||||
protected $_schema = 'jo';
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'Application_Controller_Plugin_Auth' => dirname(__FILE__) . '//Controller/Plugin/Auth.php',
|
||||
'Application_Controller_Plugin_Menu' => dirname(__FILE__) . '//Controller/Plugin/Menu.php',
|
||||
'Application_Controller_Plugin_Services' => dirname(__FILE__) . '//Controller/Plugin/Services.php',
|
||||
'Application_Form_Login' => dirname(__FILE__) . '//Form/Login.php',
|
||||
'Application_Model_AssoActes' => dirname(__FILE__) . '//Model/AssoActes.php',
|
||||
'Application_Model_BopiMarques' => dirname(__FILE__) . '//Model/BopiMarques.php',
|
||||
'Application_Model_Commandes' => dirname(__FILE__) . '//Model/Commandes.php',
|
||||
'Application_Model_CommandesActe' => dirname(__FILE__) . '//Model/CommandesActe.php',
|
||||
'Application_Model_CommandesAsso' => dirname(__FILE__) . '//Model/CommandesAsso.php',
|
||||
'Application_Model_CommandesBilan' => dirname(__FILE__) . '//Model/CommandesBilan.php',
|
||||
'Application_Model_CommandesEven' => dirname(__FILE__) . '//Model/CommandesEven.php',
|
||||
'Application_Model_CommandesKbis' => dirname(__FILE__) . '//Model/CommandesKbis.php',
|
||||
'Application_Model_CommandesPieces' => dirname(__FILE__) . '//Model/CommandesPieces.php',
|
||||
'Application_Model_CommandesStatut' => dirname(__FILE__) . '//Model/CommandesStatut.php',
|
||||
'Application_Model_ExtractionCommandes' => dirname(__FILE__) . '//Model/ExtractionCommandes.php',
|
||||
'Application_Model_FedasoBilans' => dirname(__FILE__) . '//Model/FedasoBilans.php',
|
||||
'Application_Model_HistoriquesBilans' => dirname(__FILE__) . '//Model/HistoriquesBilans.php',
|
||||
'Application_Model_InseeDepartements' => dirname(__FILE__) . '//Model/InseeDepartements.php',
|
||||
'Application_Model_InseeIdentite' => dirname(__FILE__) . '//Model/InseeIdentite.php',
|
||||
'Application_Model_InseeTabVilles' => dirname(__FILE__) . '//Model/InseeTabVilles.php',
|
||||
'Application_Model_JoAssoBilans' => dirname(__FILE__) . '//Model/JoAssoBilans.php',
|
||||
'Application_Model_JoAssoSubventions' => dirname(__FILE__) . '//Model/JoAssoSubventions.php',
|
||||
'Application_Model_JoBilans' => dirname(__FILE__) . '//Model/JoBilans.php',
|
||||
'Application_Model_JoBilansUser' => dirname(__FILE__) . '//Model/JoBilansUser.php',
|
||||
'Application_Model_JoBoampLots' => dirname(__FILE__) . '//Model/JoBoampLots.php',
|
||||
'Application_Model_JoBodaccDetail' => dirname(__FILE__) . '//Model/JoBodaccDetail.php',
|
||||
'Application_Model_JoBodaccFonctions' => dirname(__FILE__) . '//Model/JoBodaccFonctions.php',
|
||||
'Application_Model_JoEtablissements' => dirname(__FILE__) . '//Model/JoEtablissements.php',
|
||||
'Application_Model_JoGreffesActes' => dirname(__FILE__) . '//Model/JoGreffesActes.php',
|
||||
'Application_Model_JoGreffesBilans' => dirname(__FILE__) . '//Model/JoGreffesBilans.php',
|
||||
'Application_Model_JoLiens' => dirname(__FILE__) . '//Model/JoLiens.php',
|
||||
'Application_Model_JoLiensDoc' => dirname(__FILE__) . '//Model/JoLiensDoc.php',
|
||||
'Application_Model_JoLiensRef' => dirname(__FILE__) . '//Model/JoLiensRef.php',
|
||||
'Application_Model_JoRncsDirigeants' => dirname(__FILE__) . '//Model/JoRncsDirigeants.php',
|
||||
'Application_Model_JoRncsEtab' => dirname(__FILE__) . '//Model/JoRncsEtab.php',
|
||||
'Application_Model_JoScoresCutoff' => dirname(__FILE__) . '//Model/JoScoresCutoff.php',
|
||||
'Application_Model_JoScoresCutoffMvt' => dirname(__FILE__) . '//Model/JoScoresCutoffMvt.php',
|
||||
'Application_Model_JoScoresSurveillance' => dirname(__FILE__) . '//Model/JoScoresSurveillance.php',
|
||||
'Application_Model_JoSurveillancesListes' => dirname(__FILE__) . '//Model/JoSurveillancesListes.php',
|
||||
'Application_Model_JoSurveillancesSite' => dirname(__FILE__) . '//Model/JoSurveillancesSite.php',
|
||||
'Application_Model_JoTabDevises' => dirname(__FILE__) . '//Model/JoTabDevises.php',
|
||||
'Application_Model_JoTabEvenements' => dirname(__FILE__) . '//Model/JoTabEvenements.php',
|
||||
'Application_Model_JoTabFJur' => dirname(__FILE__) . '//Model/JoTabFJur.php',
|
||||
'Application_Model_JoTabMandataires' => dirname(__FILE__) . '//Model/JoTabMandataires.php',
|
||||
'Application_Model_JoTabNaf5' => dirname(__FILE__) . '//Model/JoTabNaf5.php',
|
||||
'Application_Model_JoTabPays' => dirname(__FILE__) . '//Model/JoTabPays.php',
|
||||
'Application_Model_JoTelephonie' => dirname(__FILE__) . '//Model/JoTelephonie.php',
|
||||
'Application_Model_JoZonageXY' => dirname(__FILE__) . '//Model/JoZonageXY.php',
|
||||
'Application_Model_Sdv1BourseIsin' => dirname(__FILE__) . '//Model/Sdv1BourseIsin.php',
|
||||
'Application_Model_Sdv1Clients' => dirname(__FILE__) . '//Model/Sdv1Clients.php',
|
||||
'Application_Model_Sdv1ClientsServices' => dirname(__FILE__) . '//Model/Sdv1ClientsServices.php',
|
||||
'Application_Model_Sdv1ClientsServicesDroits' => dirname(__FILE__) . '//Model/Sdv1ClientsServicesDroits.php',
|
||||
'Application_Model_Sdv1ClientsServicesIP' => dirname(__FILE__) . '//Model/Sdv1ClientsServicesIP.php',
|
||||
'Application_Model_Sdv1ClientsServicesTrigger' => dirname(__FILE__) . '//Model/Sdv1ClientsServicesTrigger.php',
|
||||
'Application_Model_Sdv1ClientsTarifs' => dirname(__FILE__) . '//Model/Sdv1ClientsTarifs.php',
|
||||
'Application_Model_Sdv1DirigeantsOp' => dirname(__FILE__) . '//Model/Sdv1DirigeantsOp.php',
|
||||
'Application_Model_Sdv1GreffeCommandesAc' => dirname(__FILE__) . '//Model/Sdv1GreffeCommandesAc.php',
|
||||
'Application_Model_Sdv1GreffeCommandesBi' => dirname(__FILE__) . '//Model/Sdv1GreffeCommandesBi.php',
|
||||
'Application_Model_Sdv1GreffeCommandesKb' => dirname(__FILE__) . '//Model/Sdv1GreffeCommandesKb.php',
|
||||
'Application_Model_Sdv1Logs' => dirname(__FILE__) . '//Model/Sdv1Logs.php',
|
||||
'Application_Model_Sdv1OrderAssoStatut' => dirname(__FILE__) . '//Model/Sdv1OrderAssoStatut.php',
|
||||
'Application_Model_Sdv1OrderBilanInput' => dirname(__FILE__) . '//Model/Sdv1OrderBilanInput.php',
|
||||
'Application_Model_Sdv1OrderPrivileges' => dirname(__FILE__) . '//Model/Sdv1OrderPrivileges.php',
|
||||
'Application_Model_Sdv1Prestations' => dirname(__FILE__) . '//Model/Sdv1Prestations.php',
|
||||
'Application_Model_Sdv1TabIdLocal' => dirname(__FILE__) . '//Model/Sdv1TabIdLocal.php',
|
||||
'Application_Model_Sdv1Utilisateurs' => dirname(__FILE__) . '//Model/Sdv1Utilisateurs.php',
|
||||
'Application_Model_Sdv1UtilisateursAuthLog' => dirname(__FILE__) . '//Model/Sdv1UtilisateursAuthLog.php',
|
||||
'Application_Model_Sdv1UtilisateursBrowserLog' => dirname(__FILE__) . '//Model/Sdv1UtilisateursBrowserLog.php',
|
||||
'Application_Model_Sdv1UtilisateursEmails' => dirname(__FILE__) . '//Model/Sdv1UtilisateursEmails.php',
|
||||
'Application_Model_Sdv1UtilisateursService' => dirname(__FILE__) . '//Model/Sdv1UtilisateursService.php',
|
||||
'Application_Model_VillesRnvpSources' => dirname(__FILE__) . '//Model/VillesRnvpSources.php',
|
||||
);
|
File diff suppressed because it is too large
Load Diff
@ -948,15 +948,17 @@ class MMap {
|
||||
8 Address level accuracy. (Since 2.59)
|
||||
9 Address level accuracy +++
|
||||
**/
|
||||
public function geoCodeAdresse($adrNum, $adrIndRep, $adrTypeVoieCourt, $adrTypeVoieLong, $adrLibVoie, $cp, $ville='', $pays='France', $codeRivoli='')
|
||||
public function geoCodeAdresse($adrNum, $adrIndRep, $adrTypeVoieCourt, $adrTypeVoieLong, $adrLibVoie, $cp, $ville='', $pays='France', $codeRivoli='')
|
||||
{
|
||||
$tabRep = array();
|
||||
$adrNum = str_pad($adrNum, 4, 0, STR_PAD_LEFT);
|
||||
$adresse = addslashes(trim(preg_replace('/ +/',' ', "$adrNum $adrIndRep $adrTypeVoieLong $adrLibVoie")));
|
||||
$adresseCourt = addslashes(trim(preg_replace('/ +/',' ', "$adrNum $adrIndRep $adrTypeVoieCourt $adrLibVoie")));
|
||||
$ville = addslashes($ville);
|
||||
$ret = $this->iDb->select('jo.zonageXY', 'lat, lon, l93_x, l93_y, alt, precis, adresseValidee, dateInsert',
|
||||
"address='$adresse' AND adr_cp='$cp' AND adr_ville='$ville'", false, MYSQL_ASSOC);
|
||||
|
||||
$ret = $this->iDb->select('jo.zonageXY', 'lat, lon, l93_x, l93_y, alt, precis, adresseValidee, IF(dateUpdate>dateInsert, dateUpdate, dateInsert) AS dateInsert ',
|
||||
"(address='$adresse' OR address='$adresseCourt') AND adr_cp='$cp' AND adr_ville='$ville' ORDER BY dateInsert DESC LIMIT 1",
|
||||
false, MYSQL_ASSOC);
|
||||
|
||||
//Existe dans la base
|
||||
if (count($ret)>0) {
|
||||
$zonage=$ret[0];
|
||||
|
@ -3,12 +3,31 @@ class MRnvp
|
||||
{
|
||||
protected $iDb;
|
||||
protected $iInsee;
|
||||
|
||||
|
||||
public $tabDevises=array();
|
||||
public $nomTronque=0;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
||||
protected $tabAdrCQ=array(
|
||||
10=>'Adresse correcte',
|
||||
20=>'Adresse correcte (Voie non reconue dans un CEDEX ou BP)',
|
||||
21=>'Adresse correcte mais numéro de facade hors borne (petite ville)',
|
||||
22=>'Adresse correcte mais numéro de facade absent (petite ville)',
|
||||
23=>'Adresse correcte mais numéro de facade hors borne (grande ville)',
|
||||
24=>'Adresse correcte mais numéro de facade absent (grande ville)',
|
||||
30=>'Voie non reconnue (petite ville)',
|
||||
31=>'Voie non reconnue (petite ville, quartier reconnu)',
|
||||
40=>'Voie absente (petite ville, quartier reconnu)',
|
||||
41=>'Voie absente (petite ville)',
|
||||
50=>'Voie non reconnue (grande ville)',
|
||||
51=>'Voie non reconnue (grande ville, quartier reconnu)',
|
||||
60=>'Voie absente (grande ville, quartier reconnu)',
|
||||
61=>'Voie absente (grande ville)',
|
||||
70=>'Voie présente mais Cp/Ville non corrigeable',
|
||||
80=>'Voie absente et Cp/Ville non corrigeable',
|
||||
90=>'Adresse à l\'étranger',
|
||||
);
|
||||
|
||||
function __construct() {
|
||||
$this->iDb = new WDB();
|
||||
$this->iInsee = new MInsee($this->iDb);
|
||||
}
|
||||
@ -23,10 +42,10 @@ class MRnvp
|
||||
$tabDevises=array();
|
||||
foreach($rep as $k=>$dev)
|
||||
$tabDevises[$dev['devInpi']*1]=$dev['devIso'];
|
||||
|
||||
|
||||
return $tabDevises;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Récupération du code ISO de la devise numérique de l'Inpi
|
||||
* @param integer $numDeviseInpi
|
||||
@ -39,7 +58,7 @@ class MRnvp
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @todo Corriger les adresses présentes dans CEDEXA (toutes les lignes)
|
||||
* @todo Ligne 3, acheter HEXALIGNE3
|
||||
@ -83,19 +102,26 @@ class MRnvp
|
||||
|
||||
// Ligne 3, acheter HEXALIGNE3
|
||||
$L3=$adrL3;
|
||||
|
||||
|
||||
// Ligne 5 et 7 par défaut
|
||||
$L7=$adrL7;
|
||||
$L5=$adrL5;
|
||||
|
||||
|
||||
// Ligne 6 : CP + Localité
|
||||
$idAdr56=false;
|
||||
$tabAdr56k=$tabAdr56L=array();
|
||||
$cp=substr(trim($adrL6),0,5);
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($adrL6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
if ($cp*1>0) {
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($adrL6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
} else {
|
||||
$cp=$cp2='';
|
||||
$ville=trim(strtr($adrL6,array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
}
|
||||
|
||||
$ville=preg_replace('/ CEDEX\s?.*$/ui','',$ville);
|
||||
$tabRetI=array(
|
||||
'operateurRnvp'=>'SED',
|
||||
'in_cp'=>$cp,
|
||||
'in_dep'=>$cp2,
|
||||
'in_ville'=>$ville,
|
||||
@ -107,7 +133,7 @@ class MRnvp
|
||||
'in_L6'=>$adrL6,
|
||||
'in_L7'=>$adrL7);
|
||||
//$dureeM=round(microtime(1)-$tDeb,3);
|
||||
|
||||
|
||||
$tD=microtime(1);
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"idAdr56, codeInseeCom, libCom$norme, codeInseeGlobal, indPluridis, libLigne5n$norme, indRoudis, codePostal, libLigne6n$norme, codeInseePre, codeMaj$norme, dateMaj$norme, MATCH (codePostal, libCom38) AGAINST ('$cp $ville' IN NATURAL LANGUAGE MODE) AS score",
|
||||
@ -117,8 +143,7 @@ class MRnvp
|
||||
$tabRetE=array(
|
||||
'dureeV'=> round(microtime(1)-$tD,3),
|
||||
'errRNVPcode'=>'V0',
|
||||
'errRNVPlib'=>'Aucune correspondance CP VILLE'
|
||||
);
|
||||
'errRNVPlib'=> "Aucune correspondance CP VILLE (cp=$cp, ville=$ville)");
|
||||
$erreur=true;
|
||||
} else {
|
||||
foreach($ret as $i=>$iRet) {
|
||||
@ -194,7 +219,7 @@ class MRnvp
|
||||
}
|
||||
}
|
||||
if ($erreur) return array_merge($tabRetI,$tabRetE);
|
||||
|
||||
|
||||
// Ligne 4 : Découpage N° Répétition TypeVoie et LibelléVoie
|
||||
$tD=microtime(1);
|
||||
$matriculeHexavia=false;
|
||||
@ -258,9 +283,9 @@ class MRnvp
|
||||
if ($iRet['score']>17 && isset($ret[$i+1]) && $iRet['score']>$ret[$i+1]['score']) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$dureeR=round(microtime(1)-$tD,3);
|
||||
|
||||
|
||||
if (!$matriculeHexavia) {
|
||||
if ($debug) print_r($ret);
|
||||
if ($debug) echo ("Plusieurs correspondances Voies pour $adrL4 $adrL6 dans cette commune ('$strAdr56') !".EOL);
|
||||
@ -268,13 +293,13 @@ class MRnvp
|
||||
$tabRetE=array( 'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'errRNVPcode'=>'R2',
|
||||
'errRNVPlib'=>"Plusieurs correspondances Voies pour $adrL4 $adrL6 dans cette commune ('$strAdr56')");
|
||||
|
||||
|
||||
return array_merge($tabRetI,$tabRetV,$tabRetE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$matriculeHexavia && @strlen($L4)==0) $L4=$adrL4;
|
||||
|
||||
|
||||
$tD=microtime(1);
|
||||
$tabLen=$tabMaxLen=array();
|
||||
$tabLen[1]=strlen($L1);
|
||||
@ -317,7 +342,7 @@ class MRnvp
|
||||
}
|
||||
}
|
||||
$dureeN=round(microtime(1)-$tD,3);
|
||||
|
||||
|
||||
$tabRetR = array(
|
||||
'L1'=>$L1,
|
||||
'L2'=>$L2,
|
||||
@ -338,12 +363,12 @@ class MRnvp
|
||||
'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'dureeM'=>$dureeM*1.0,
|
||||
);
|
||||
|
||||
|
||||
$tabRet = array_merge($tabRetI,$tabRetV,$tabRetR,$tabRetE);
|
||||
|
||||
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
|
||||
/** Retourne le tableau des abbréviations existantes par type d'abréviation
|
||||
*/
|
||||
function getAbreviations($typeAbrev)
|
||||
@ -377,12 +402,12 @@ class MRnvp
|
||||
//print_r($tabRet);die();
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
|
||||
/** Normalise une raison sociale ou un nom
|
||||
**/
|
||||
function normaliseRS($nomLong, $taille=38, $debug=false)
|
||||
{
|
||||
$nomCourt=preg_replace('/[^A-Z0-9%\'\"\-&\*\/\s]/','',trim(strtoupper($nomLong)));
|
||||
$nomCourt=preg_replace('/[^A-Z0-9%@&\'\(\)\"\-\*\/\s\+]/','',trim(strtoupper($nomLong)));
|
||||
$tabMots=split("[^[:alpha:]]+", $nomCourt);
|
||||
$passage=0;
|
||||
$this->nomTronque=0;
|
||||
@ -399,7 +424,7 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "1-Voies=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
//print_r($tabMots);
|
||||
// 2. Remplacement des Titres par leurs abréviation
|
||||
$tabTmp=$this->getAbreviations('T');
|
||||
@ -412,14 +437,14 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "2a-Titres=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
// 2. Remplacement des Formes Juridiques
|
||||
$tabTmp=$this->getAbreviations('J');
|
||||
foreach ($tabTmp as $lib=>$abr)
|
||||
$nomCourt=trim(str_replace(" $lib ", ' '.$abr.' ', " $nomCourt "));
|
||||
if ($debug) echo "2b-FJ=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
// 4. Suppression des articles
|
||||
$tabTmp=$this->getAbreviations('A');
|
||||
foreach ($tabTmp as $lib=>$abr) {
|
||||
@ -451,10 +476,10 @@ class MRnvp
|
||||
}
|
||||
if ($debug) echo "5-Autres Noms=$nomCourt".EOL;
|
||||
if (strlen($nomCourt)<=$taille) break;
|
||||
|
||||
|
||||
$nomCourt=substr($nomCourt,0,$taille);
|
||||
$this->nomTronque=1;
|
||||
|
||||
|
||||
//die($nomCourt);
|
||||
/** @todo A finir
|
||||
Tronquer ou abréger dans cette ordre
|
||||
@ -465,21 +490,21 @@ class MRnvp
|
||||
- tronquer à 4 caractères les types de voie non normalisés
|
||||
- tronquer les extensions de voie
|
||||
- réduire le nom de la voie en supprimant les mots de la gauche vers la droite
|
||||
|
||||
|
||||
Gérer les pluriels pour les voies, nom, titres, et formes juridiques
|
||||
**/
|
||||
$passage++;
|
||||
}
|
||||
return $nomCourt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Code Insee de la commune libCom32 Libellé de la commune (Ancienne norme 32) libCom38 Libellé
|
||||
function getLibCommune($codeInsee, $norme=38) {
|
||||
if ($norme<>32 && $norme<>38) {
|
||||
return 'La norme doit être 32 ou 38 caractères (38 par défaut)'.EOL;
|
||||
}
|
||||
|
||||
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"libCom32 , libCom38",
|
||||
"codeInseeCom='$codeInsee' LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
@ -496,6 +521,16 @@ class MRnvp
|
||||
else return $ret[0]['libCom38'];
|
||||
}
|
||||
|
||||
function getCPCommune($codeInsee)
|
||||
{
|
||||
$ret=$this->iDb->select('villes.hexaviaVilles',
|
||||
"codePostal",
|
||||
"codeInseeCom='$codeInsee' GROUP BY codePostal",false, MYSQL_ASSOC);
|
||||
$nbRet=count($ret);
|
||||
if ($nbRet==1) return $ret[0]['codePostal'];
|
||||
return false;
|
||||
}
|
||||
|
||||
function getCodCommune($libelleCommune, $depOuCp='', $debug=false)
|
||||
{
|
||||
$norme=38;
|
||||
@ -529,10 +564,32 @@ class MRnvp
|
||||
}
|
||||
return $codeCommune;
|
||||
}
|
||||
|
||||
function normaliseAdresse76310($L1,$L2,$L3,$L4,$L5,$L6,$L7='') {
|
||||
//ini_set('soap.wsdl_cache_enabled', 0);
|
||||
$client = new SoapClient('http://www.rnvp-en-ligne.com/service.asmx?wsdl');
|
||||
|
||||
function normaliseAdresse76310($L1,$L2,$L3,$L4,$L5,$L6,$L7='')
|
||||
{
|
||||
$tDeb=microtime(1);
|
||||
$tabRetR=$tabRetE=array();
|
||||
|
||||
$cp=substr(trim($L6),0,5);
|
||||
$cp2=substr($cp,0,2);
|
||||
$ville=trim(strtr(substr($L6,5),array(' SAINT '=>' ST ',' SAINTE '=>' STE ')));
|
||||
$ville=preg_replace('/ CEDEX\s?.*$/ui','',$ville);
|
||||
$tabRetI=array( 'operateurRnvp'=>'76310WEB',
|
||||
'in_cp'=>$cp,
|
||||
'in_dep'=>$cp2,
|
||||
'in_ville'=>$ville,
|
||||
'in_L1'=>trim($L1),
|
||||
'in_L2'=>trim($L2),
|
||||
'in_L3'=>trim($L3),
|
||||
'in_L4'=>trim($L4),
|
||||
'in_L5'=>trim($L5),
|
||||
'in_L6'=>trim($L6),
|
||||
'in_L7'=>trim($L7));
|
||||
|
||||
//$client = new SoapClient('http://www.rnvp-en-ligne.com/service.asmx?wsdl');
|
||||
$client = new SoapClient('http://www.rnvp-en-ligne.com/service_v5.asmx?wsdl');
|
||||
$nbEssais=1;
|
||||
|
||||
$array = array (
|
||||
'pi_session' => '-1',
|
||||
'pi_user' => 'SDPROD',
|
||||
@ -550,21 +607,109 @@ class MRnvp
|
||||
'pio_cpville' => utf8_encode($L6), // Ligne 6
|
||||
'pio_pays' => utf8_encode($L7), // Ligne 7
|
||||
/* 'po_tnp' => '',
|
||||
'po_sex' => '',
|
||||
'po_civlong' => '',
|
||||
'po_cp' => '',
|
||||
'po_ville' => '',
|
||||
'po_insee' => '',
|
||||
'po_cqtnp' => '',
|
||||
'po_cqadrs' => '',
|
||||
'po_risquerestru' => '',
|
||||
'po_poidsmodif' => '',
|
||||
'po_rejet' => '',
|
||||
'po_etranger' => ''*/
|
||||
);
|
||||
$result = $client->Elfyweb_RNVP_Standard($array);
|
||||
return ($result);
|
||||
'po_sex' => '',
|
||||
'po_civlong' => '',
|
||||
'po_cp' => '',
|
||||
'po_ville' => '',
|
||||
'po_insee' => '',
|
||||
'po_cqtnp' => '',
|
||||
'po_cqadrs' => '',
|
||||
'po_risquerestru' => '',
|
||||
'po_poidsmodif' => '',
|
||||
'po_rejet' => '',
|
||||
'po_etranger' => ''*/
|
||||
);
|
||||
while(1) {
|
||||
try {
|
||||
//$result = $client->Elfyweb_RNVP_Standard($array);
|
||||
$result = $client->Elfyweb_RNVP_Expert_V50($array);
|
||||
//print_r($result);
|
||||
$tabRetR=array( 'L1'=>$L1,
|
||||
'L2'=>$L2,
|
||||
'L3'=>strtoupper(utf8_decode($result->pio_cadrs)),
|
||||
'L4'=>strtoupper(utf8_decode($result->pio_adresse)),
|
||||
'L5'=>strtoupper(utf8_decode($result->pio_lieudit)),
|
||||
'L6'=>strtoupper(utf8_decode($result->pio_cpville)),
|
||||
/* [po_risquerestru] => 0
|
||||
[po_poidsmodif] => 0
|
||||
[po_rejet] =>
|
||||
[po_etranger] =>*/
|
||||
'Cp'=>$result->po_cp,
|
||||
'Ville'=>$result->po_ville,
|
||||
'Insee'=>$result->po_insee,
|
||||
/*'CQadrs'=>$result->po_cqadrs,
|
||||
'CQadrsLib'=>$this->tabAdrCQ[$result->po_cqadrs],
|
||||
'CQAdrRnvp'=>$this->getLibQualiteAdresse76310($result->po_cqadrs, $result->rejet),*/
|
||||
'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
);
|
||||
if (@$result->pio_pays<>'FRA') $tabRet['L7']=$result->pio_pays;
|
||||
break;
|
||||
} catch (SoapFault $fault) {
|
||||
$nbEssais++;
|
||||
if ($nbEssai<5) continue;
|
||||
$tabRetE=array( 'dureeRnvp'=>round(microtime(1)-$tDeb,3),
|
||||
'errRNVPcode'=>'S0',
|
||||
'errRNVPlib'=>"Erreur SOAP : ".print_r($fault,1));
|
||||
}
|
||||
}
|
||||
$tabRet=array_merge($tabRetI,$tabRetR,$tabRetE);
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
function getLibQualiteAdresse76310($cqadrs, $correctionDouteuse)
|
||||
{
|
||||
switch ($cqadrs*1) {
|
||||
case 10: // Adresse correcte
|
||||
case 20: // Adresse correcte (Voie non reconue dans un CEDEX ou BP)
|
||||
case 21: // Adresse correcte mais numéro de facade hors borne (petite ville)
|
||||
case 22: // Adresse correcte mais numéro de facade absent (petite ville)
|
||||
case 23: // Adresse correcte mais numéro de facade hors borne (grande ville)
|
||||
case 24: // Adresse correcte mais numéro de facade absent (grande ville)
|
||||
$cqRnvpSed=1;
|
||||
break;
|
||||
case 31: // Voie non reconnue (petite ville, quartier reconnu)
|
||||
case 51: // Voie non reconnue (grande ville, quartier reconnu)
|
||||
$cqRnvpSed=2;
|
||||
break;
|
||||
case 30: // Voie non reconnue (petite ville)
|
||||
case 50: // Voie non reconnue (grande ville)
|
||||
$cqRnvpSed=3;
|
||||
break;
|
||||
case 40: // Voie absente (petite ville, quartier reconnu)
|
||||
case 41: // Voie absente (petite ville)
|
||||
case 60: // Voie absente (grande ville, quartier reconnu)
|
||||
case 61: // Voie absente (grande ville)
|
||||
$cqRnvpSed=4;
|
||||
break;
|
||||
case 70: // Voie présente mais Cp/Ville non corrigeable
|
||||
case 80: // Voie absente et Cp/Ville non corrigeable
|
||||
$cqRnvpSed=5;
|
||||
break;
|
||||
default:
|
||||
$cqRnvpSed=0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($correctionDouteuse=='D') $cqRnvpSed=0;
|
||||
return $cqRnvpSed;
|
||||
}
|
||||
|
||||
function getAdresseRnvpSource($source, $source_id, $num=0)
|
||||
{
|
||||
$ret=$this->iDb->select(
|
||||
'villes.rnvpSources',
|
||||
'id, source, source_id, num, L1rnvp, L2rnvp, L3rnvp, L4rnvp, L5rnvp, L6rnvp, L7rnvp, Pays, dateInsert,
|
||||
operateurRnvp, dateEnvoiRnvp, dateRetourRnvp, codeRetour, NumVoie, BisTer, TypeVoieCourt, TypeVoieLong, LibVoie,
|
||||
Cp, Ville, Insee, CQadrs, CorrectionImportante, CorrectionDouteuse, HexaCle, CQL3, InseeGlobal, OldInsee,
|
||||
IsInseeReconstitue, NumDept, IdHexavia, IdHexaposte, Iris_Rivoli, Iris_Ilot99, Iris_CodeIris, Iris_Canton,
|
||||
Iris_Zus, Iris_Zfu, CqIris, dateUpdate',
|
||||
"source=$source AND source_id=$source_id AND num=$num LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
$tabRet=$ret[0];
|
||||
$tabRet['CQadrsLib']=$this->tabAdrCQ[$tabRet['CQadrs']];
|
||||
|
||||
$tabRet['CQAdrRnvp']=$this->getLibQualiteAdresse76310($tabRet['CQadrs'], $tabRet['CorrectionDouteuse']);
|
||||
|
||||
return $tabRet;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -280,12 +280,13 @@ class MTel
|
||||
}
|
||||
}
|
||||
|
||||
if ($last)
|
||||
{
|
||||
$tabRet=array();
|
||||
foreach($tabLast as $typeTel=>$tabPriorite) {
|
||||
ksort($tabPriorite);
|
||||
$tabRet[]=current($tabPriorite);
|
||||
if ($last) {
|
||||
$tabRet = array();
|
||||
if ($tabLast != null && count($tabLast) > 0 ) {
|
||||
foreach($tabLast as $typeTel=>$tabPriorite) {
|
||||
ksort($tabPriorite);
|
||||
$tabRet[]=current($tabPriorite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ class MTva
|
||||
$this->vatDefined = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ( $db === null ) {
|
||||
$this->iDb = new WDB();
|
||||
} else {
|
||||
@ -39,10 +39,9 @@ class MTva
|
||||
return false;
|
||||
}
|
||||
|
||||
$info = $this->iDb->select('sdv1.siren_tva', "cle, DATE_FORMAT(dateMod,'%Y%m%d') as DateMAJ", "siren=$siren", false, MYSQL_ASSOC);
|
||||
$info = $this->iDb->select('sdv1.siren_tva', "LPAD(cle,2,0) AS cle, DATE_FORMAT(dateMod,'%Y%m%d') as DateMAJ", "siren=$siren", false, MYSQL_ASSOC);
|
||||
$tab=$info[0];
|
||||
if (count($tab)>0) {
|
||||
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMTva sur $siren en cache", print_r($tab, true));
|
||||
if ( $tab['cle']<>NULL || ( $tab['cle']==NULL && $tab['DateMAJ']>=date('Ymd',mktime(0,0,0,date('m')-6,date('d'),date('Y'))) )) {
|
||||
$cle=$tab['cle'];
|
||||
if ($cle==NULL) { $attribue=false; $cle=$cleAlgo; }
|
||||
@ -51,7 +50,6 @@ class MTva
|
||||
$this->vatDefined=$attribue;
|
||||
return true;
|
||||
}
|
||||
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "classMTva sur $siren REVALIDATION", print_r($tab, true));
|
||||
}
|
||||
$cle=$cleAlgo;
|
||||
$nbIndispo=0;
|
||||
@ -98,8 +96,7 @@ class MTva
|
||||
$this->vatDefined=true;
|
||||
return true;
|
||||
//return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'result'=>array('siren'=>$siren, 'vatNumber'=>"FR$cle$siren", 'vatDefined'=>true));
|
||||
} elseif (strpos($body, 'Service non disponible')>0 ||
|
||||
strpos($body, 'ponse trop long.')>0) {
|
||||
} elseif (strpos($body, 'Service non disponible')>0 || strpos($body, 'ponse trop long.')>0) {
|
||||
$nbIndispo++;
|
||||
if ($nbIndispo<3) {
|
||||
//echo date ('Y/m/d - H:i:s') .' - '.$eol;
|
||||
|
@ -30,7 +30,7 @@ function getIndiscoreHisto($siren)
|
||||
$ret = $iDb->query($query);
|
||||
$tabRet = array();
|
||||
while( $ret = $iDb->fetch(MYSQL_ASSOC) ) {
|
||||
$tabRet[]=array(
|
||||
$tabRet[] = array(
|
||||
'siren' => $ret['siren'],
|
||||
'actif' => $ret['actif'],
|
||||
'procol' => $ret['procol'],
|
||||
@ -619,7 +619,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
//Définition du nom des variables
|
||||
require_once realpath(dirname(__FILE__)).'/globalCommentaires.php';
|
||||
|
||||
$NIVEAU=$cycleClient; // 1, 2, 3 ou 5 Niveau de version des commentaires
|
||||
$NIVEAU = $cycleClient; // 1, 2, 3 ou 5 Niveau de version des commentaires
|
||||
|
||||
if ( $db === null ) {
|
||||
$iDb = new WDB();
|
||||
@ -628,12 +628,11 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
$iRncs = new MRncs($iDb);
|
||||
$iInsee = new MInsee($iDb);
|
||||
$iInsee->AnnoncesInMemory = true;
|
||||
|
||||
/**
|
||||
* Récupération des informations identitaire
|
||||
*/
|
||||
$tabIdentite=$iInsee->getIdentiteEntreprise($siren, $nic, 0, false, $accesDist);
|
||||
$tabIdentite = $iInsee->getIdentiteEntreprise($siren, $nic, 0, false, false);
|
||||
$timer['identite']=microtime(true);
|
||||
|
||||
if (empty($tabIdentite)) {
|
||||
@ -1119,7 +1118,6 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
// On renverse les tableaux 2008, 2007, 2006... en 2006, 2007, 2008
|
||||
$tabRegX = array_reverse($tabRegX);
|
||||
|
||||
|
||||
global $Y, $Yaff; // Tableau des années en paramètres + $nbAnnees Projetées
|
||||
global $PROJECTAUX; // Taux de projection de n à n+$nbAnnees
|
||||
global $PROJECCOEF;
|
||||
@ -1321,43 +1319,48 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
|
||||
/** Divers éléments calculés **/
|
||||
$iInsee->AnnoncesLegalesVisu = true;
|
||||
$CompanyAnnonces = $iInsee->getAnnoncesLegales($siren);
|
||||
$iInsee->AnnoncesLegalesVisu = false;
|
||||
|
||||
// Annonces de dépôt des comptes
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, 'C', false, true);
|
||||
$nbDepotCpt=count($tabDepotCpt);
|
||||
$nbMoisMax=0;
|
||||
$ANNONCEBODCMANQDATE=false;
|
||||
$ANNONCEBODCREGUL=true;
|
||||
$BILANDERANNEE=0;
|
||||
$tabAnnBodc=array();
|
||||
if($nbDepotCpt>0) {
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) {
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, 'C');
|
||||
$nbDepotCpt = count($tabDepotCpt);
|
||||
$nbMoisMax = 0;
|
||||
$ANNONCEBODCMANQDATE = false;
|
||||
$ANNONCEBODCREGUL = true;
|
||||
$BILANDERANNEE = 0;
|
||||
$tabAnnBodc = array();
|
||||
if($nbDepotCpt > 0) {
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep == 0) {
|
||||
// On prend la dernière Annonce de dépot de comptes
|
||||
$ANNONCEPUB=true;
|
||||
$ANNONCEPUB = true;
|
||||
|
||||
$tabTmp=array();
|
||||
foreach ($depot['evenements'] as $even)
|
||||
$tabTmp[]=$even['LibEven'];
|
||||
// Libellé code Even de la plus récente annonce publiée peu importe la source
|
||||
$ANNONCEDER=implode(', ', $tabTmp);
|
||||
$ANNONCEDERDATE=$depot['DateParution'];
|
||||
switch(substr($depot['BodaccCode'],0,1)) {
|
||||
case 'B': $ANNONCEDERSOURCE='BODACC'; break;// INPI, Publication Régionale
|
||||
case 'P': $ANNONCEDERSOURCE='RNCS'; break;
|
||||
case 'G': $ANNONCEDERSOURCE='GREFFE DU TRIBUNAL'; break;
|
||||
default: $ANNONCEDERSOURCE='JOURNAL REGIONAL'; break;
|
||||
$tabTmp = array();
|
||||
foreach ($depot['evenements'] as $even) {
|
||||
$tabTmp[] = $even['LibEven'];
|
||||
}
|
||||
$ANNONCEDERTEXTE=$depot['texteAnnonce'];// INPI, Publication Régionale
|
||||
// Libellé code Even de la plus récente annonce publiée peu importe la source
|
||||
$ANNONCEDER = implode(', ', $tabTmp);
|
||||
$ANNONCEDERDATE = $depot['DateParution'];
|
||||
switch(substr($depot['BodaccCode'],0,1)) {
|
||||
case 'B': $ANNONCEDERSOURCE = 'BODACC'; break; // INPI, Publication Régionale
|
||||
case 'P': $ANNONCEDERSOURCE = 'RNCS'; break;
|
||||
case 'G': $ANNONCEDERSOURCE = 'GREFFE DU TRIBUNAL'; break;
|
||||
default: $ANNONCEDERSOURCE = 'JOURNAL REGIONAL'; break;
|
||||
}
|
||||
$ANNONCEDERTEXTE = $depot['texteAnnonce']; // INPI, Publication Régionale
|
||||
|
||||
// Date de l'annonce
|
||||
$ANNONCEDATE=$depot['DateParution'];
|
||||
$ANNONCEBODCDATE=$depot['DateParution'];
|
||||
$BILANDERANNEE=date('Y', mktime(0, 0, 0, $classWdate->dateT('Y-m-d', 'm', $depot['dateEffet']), $classWdate->dateT('Y-m-d', 'd', $depot['dateEffet']), $classWdate->dateT('Y-m-d', 'Y', $depot['dateEffet'])+1));
|
||||
$ANNONCEBODDATE=$depot['DateParution'];//dateEffet
|
||||
if ($nbDepotCpt==1 && // 1 seul dépôt des comptes
|
||||
abs($classWdate->nbMoisEntre(date('Y-m-d'), $dateCrea))<60) // Entreprise de moins de 5 ans (60 mois)
|
||||
$nbMoisMax=abs($classWdate->nbMoisEntre($dateCrea,$depot['dateEffet']));
|
||||
$ANNONCEDATE = $depot['DateParution'];
|
||||
$ANNONCEBODCDATE = $depot['DateParution'];
|
||||
$BILANDERANNEE = date('Y', mktime(0, 0, 0, $classWdate->dateT('Y-m-d', 'm', $depot['dateEffet']), $classWdate->dateT('Y-m-d', 'd', $depot['dateEffet']), $classWdate->dateT('Y-m-d', 'Y', $depot['dateEffet'])+1));
|
||||
$ANNONCEBODDATE = $depot['DateParution']; //dateEffet
|
||||
if ($nbDepotCpt==1 && // 1 seul dépôt des comptes
|
||||
abs($classWdate->nbMoisEntre(date('Y-m-d'), $dateCrea))<60) {// Entreprise de moins de 5 ans (60 mois)
|
||||
$nbMoisMax=abs($classWdate->nbMoisEntre($dateCrea,$depot['dateEffet']));
|
||||
}
|
||||
} else {
|
||||
if (abs($classWdate->nbMoisEntre($lastDepot, $depot['dateEffet']))>$nbMoisMax) {
|
||||
$nbMoisMax=abs($classWdate->nbMoisEntre($lastDepot, $depot['dateEffet']));
|
||||
@ -1389,48 +1392,55 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
// Publications régulieres et 12 mois identiques
|
||||
if ( ($nbMoisBilDate+1) == $nbMoisBilCumul
|
||||
|| $nbMoisBilDate == $nbMoisBilCumul
|
||||
|| ($nbMoisBilDate-1)==$nbMoisBilCumul ) {
|
||||
$ANNONCEBODCREGUL=1;
|
||||
|| ($nbMoisBilDate-1) == $nbMoisBilCumul ) {
|
||||
$ANNONCEBODCREGUL = 1;
|
||||
// Annonces BODACC de changement de date d'exercice
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2303), false);
|
||||
if (count($tabDepotCpt)>0) $ANNONCEBODCREGUL=2;
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2303));
|
||||
if (count($tabDepotCpt)>0) $ANNONCEBODCREGUL = 2;
|
||||
|
||||
} else {
|
||||
// Pas de publication régulière des comptes
|
||||
$ANNONCEBODCREGUL=0;
|
||||
}
|
||||
// Pas de publication régulière des comptes
|
||||
else {
|
||||
$ANNONCEBODCREGUL = 0;
|
||||
}
|
||||
|
||||
if ($BILANDERANNEE==0 && date('m')*1>6) // Pas de Dernière année de bilan et on est en juillet passé
|
||||
// Pas de Dernière année de bilan et on est en juillet passé
|
||||
if ($BILANDERANNEE==0 && date('m')*1>6) {
|
||||
$BILANDERANNEE=date('Y', mktime(0, 0, 0, date('m'), date('d'), date('Y')-1));
|
||||
elseif ($BILANDERANNEE==0 && date('m')*1<=6) // Pas de Dernière année de bilan et on est au premier semestre
|
||||
}
|
||||
// Pas de Dernière année de bilan et on est au premier semestre
|
||||
elseif ($BILANDERANNEE==0 && date('m')*1<=6) {
|
||||
$BILANDERANNEE=date('Y', mktime(0, 0, 0, date('m'), date('d'), date('Y')-2));
|
||||
}
|
||||
|
||||
// Annonces BODACC A
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, 'BODA', false, true);
|
||||
$nbDepotA=count($tabDepotCpt);
|
||||
if ($nbDepotA>0) {
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) {
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, 'BODA');
|
||||
$nbDepotA = count($tabDepotCpt);
|
||||
if ($nbDepotA > 0) {
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep == 0) {
|
||||
$ANNONCEBODADATE=$depot['DateParution'];
|
||||
if ($classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODADATE)>$classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODDATE)) {
|
||||
$ANNONCEBODDATE=$depot['DateParution'];
|
||||
$tabTmp=array();
|
||||
foreach ($depot['evenements'] as $even)
|
||||
$tabTmp[]=$even['LibEven'];
|
||||
if ($classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODADATE) > $classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODDATE)) {
|
||||
$ANNONCEBODDATE = $depot['DateParution'];
|
||||
$tabTmp = array();
|
||||
foreach ($depot['evenements'] as $even) {
|
||||
$tabTmp[] = $even['LibEven'];
|
||||
}
|
||||
// Libellé code Even de la plus récente annonce publiée peu importe la source
|
||||
$ANNONCEDER=implode(', ', $tabTmp);
|
||||
$ANNONCEDER = implode(', ', $tabTmp);
|
||||
$ANNONCEDERDATE=$depot['DateParution'];
|
||||
switch(substr($depot['BodaccCode'],0,1)) {
|
||||
case 'B': $ANNONCEDERSOURCE='BODACC'; break;// INPI, Publication Régionale
|
||||
case 'P': $ANNONCEDERSOURCE='RNCS'; break;
|
||||
case 'G': $ANNONCEDERSOURCE='GREFFE DU TRIBUNAL'; break;
|
||||
default: $ANNONCEDERSOURCE='JOURNAL REGIONAL'; break;
|
||||
case 'B': $ANNONCEDERSOURCE = 'BODACC'; break; // INPI, Publication Régionale
|
||||
case 'P': $ANNONCEDERSOURCE = 'RNCS'; break;
|
||||
case 'G': $ANNONCEDERSOURCE = 'GREFFE DU TRIBUNAL'; break;
|
||||
default: $ANNONCEDERSOURCE = 'JOURNAL REGIONAL'; break;
|
||||
}
|
||||
$ANNONCEDERTEXTE=$depot['texteAnnonce'];// INPI, Publication Régionale
|
||||
$ANNONCEDERTEXTE = $depot['texteAnnonce'];// INPI, Publication Régionale
|
||||
}
|
||||
} elseif ( ($iDep+1)==$nbDepotA ) {
|
||||
// La première annonce de Bodacc A étant cencée être celle de création
|
||||
$TRIBUNAL_CREATION=strtr($depot['Tribunal'],array('TC '=>'Tribunal de Commerce de '));
|
||||
}
|
||||
// La première annonce de Bodacc A étant cencée être celle de création
|
||||
elseif ( ($iDep+1)==$nbDepotA ) {
|
||||
$TRIBUNAL_CREATION = strtr($depot['Tribunal'], array('TC '=>'Tribunal de Commerce de '));
|
||||
}
|
||||
$ANNONCEBOD++;
|
||||
$ANNONCEBODA++;
|
||||
@ -1438,26 +1448,27 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
|
||||
// Annonces BODACC B
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, 'BODB', false, true);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) {
|
||||
$ANNONCEBODBDATE=$depot['DateParution'];
|
||||
if ($classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODBDATE)>$classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODDATE)) {
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, 'BODB');
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt) > 0){
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep == 0) {
|
||||
$ANNONCEBODBDATE = $depot['DateParution'];
|
||||
if ($classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODBDATE) > $classWdate->dateT('Y-m-d', 'Ymd',$ANNONCEBODDATE)) {
|
||||
$ANNONCEBODDATE=$depot['DateParution'];
|
||||
$tabTmp=array();
|
||||
foreach ($depot['evenements'] as $even)
|
||||
$tabTmp[]=$even['LibEven'];
|
||||
$tabTmp = array();
|
||||
foreach ($depot['evenements'] as $even) {
|
||||
$tabTmp[] = $even['LibEven'];
|
||||
}
|
||||
// Libellé code Even de la plus récente annonce publiée peu importe la source
|
||||
$ANNONCEDER=implode(', ', $tabTmp);
|
||||
$ANNONCEDERDATE=$depot['DateParution'];
|
||||
$ANNONCEDER = implode(', ', $tabTmp);
|
||||
$ANNONCEDERDATE = $depot['DateParution'];
|
||||
switch(substr($depot['BodaccCode'],0,1)) {
|
||||
case 'B': $ANNONCEDERSOURCE='BODACC'; break;// INPI, Publication Régionale
|
||||
case 'P': $ANNONCEDERSOURCE='RNCS'; break;
|
||||
case 'G': $ANNONCEDERSOURCE='GREFFE DU TRIBUNAL'; break;
|
||||
default: $ANNONCEDERSOURCE='JOURNAL REGIONAL'; break;
|
||||
}
|
||||
$ANNONCEDERTEXTE=$depot['texteAnnonce'];// INPI, Publication Régionale
|
||||
$ANNONCEDERTEXTE = $depot['texteAnnonce'];// INPI, Publication Régionale
|
||||
}
|
||||
}
|
||||
$ANNONCEBOD++;
|
||||
@ -1466,198 +1477,225 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
|
||||
// Annonces BODACC Changement d'adresse
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2300,2301,2901,2902,2903,2904), false);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0){ $ANNONCEADRDATE = $depot['DateParution']; }
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2300,2301,2901,2902,2903,2904));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt) > 0){
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep == 0) {
|
||||
$ANNONCEADRDATE = $depot['DateParution'];
|
||||
}
|
||||
$ANNONCEADR++;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Changement de dirigeant
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2315), false, true);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) { $ANNONCEDIRDATE = $depot['DateParution']; }
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2315));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt) > 0){
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep==0) {
|
||||
$ANNONCEDIRDATE = $depot['DateParution'];
|
||||
}
|
||||
$ANNONCEDIR++;
|
||||
if (preg_match('/Commissaire/i', $depot['texteAnnonce'])) {
|
||||
if (preg_match('/Commissaire/iu', $depot['texteAnnonce'])) {
|
||||
$ANNONCECAC++;
|
||||
/** @todo $ANNONCECAC2 dans les 24 derniers mois
|
||||
** et $ANNONCECAC3 dans les 36 derniers mois
|
||||
**/
|
||||
if ($ANNONCECAC==1)
|
||||
$ANNONCECACDATE=$depot['DateParution'];
|
||||
if ($ANNONCECAC == 1) {
|
||||
$ANNONCECACDATE = $depot['DateParution'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Changement de FJur
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2307), false);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) { $ANNONCEFJURDATE = $depot['DateParution']; }
|
||||
// @todo A revoir
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2307));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt) > 0){
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
if ($iDep==0) {
|
||||
$ANNONCEFJURDATE = $depot['DateParution'];
|
||||
}
|
||||
$FJUR_PRE='';
|
||||
//if ($iDep==1 && trim($depot['libFJ'])<>'') $FJUR_PRE=$depot['libFJ'];
|
||||
$ANNONCEFJUR++;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Fusion/Absorptions
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2700,2701,2702,2703,2710,2720,2721,2725,2726,2730,2740), false);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
/**
|
||||
* 2700 Fusion/Absorption (entitée absorbante)
|
||||
* 2701 Fusion/Absorption (Entitée absorbante. Entité absorbée inconnue)
|
||||
* 2702 Fusion/Absorption (Entitée absorbante. Entité absorbée mal SIRENEE)
|
||||
* 2703 Fusion/Absorption (Entitée absorbante. Entité absorbée non SIRENEE)
|
||||
* 2720 Fusion/Absorption (entitée absorbée)
|
||||
* 2721 Fusion/Absorption (entitée absorbée non identifiée)
|
||||
* 2725 Fusion/Absorption
|
||||
*/
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2700,2701,2702,2703,2710,2720,2721,2725,2726,2730,2740));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt) > 0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0) { $ANNONCEFUSDATE=$depot['DateParution']; }
|
||||
if ($iDep == 0) {
|
||||
$ANNONCEFUSDATE = $depot['DateParution'];
|
||||
}
|
||||
$ANNONCEFUS++;
|
||||
foreach ($depot['evenements'] as $even) {
|
||||
switch ($even['CodeEven']*1) {
|
||||
case 2710: // Projet de fusion (entitée absorbante)
|
||||
case 2726: // Projet de Fusion/Absorption
|
||||
case 2730: // Projet de fusion (entitée absorbée)
|
||||
$FUSIONPROJET_DATE=$depot['dateJugement']; // Date du projet de fusion
|
||||
$FUSIONPROJET=$depot['complement']; // Présence d'un projet de fusion, libellé du projet
|
||||
$FUSIONPROJET_SIREN='';
|
||||
$FUSIONPROJET_DATE = $depot['dateJugement']; // Date du projet de fusion
|
||||
$FUSIONPROJET = $depot['complement']; // Présence d'un projet de fusion, libellé du projet
|
||||
$FUSIONPROJET_SIREN = '';
|
||||
if (preg_match_all("/((?:[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}))/", $FUSIONPROJET, $matches)) {
|
||||
foreach ($matches[1] as $FUSIONPROJET_SIREN) {
|
||||
$FUSIONPROJET_SIREN=strtr($FUSIONPROJET_SIREN, array('.'=>'','-'=>'', ' '=>''));
|
||||
if (!$iInsee->valideSiren($FUSIONPROJET_SIREN)) $FUSIONPROJET_SIREN=0;
|
||||
else break;
|
||||
$FUSIONPROJET_SIREN = strtr($FUSIONPROJET_SIREN, array('.'=>'','-'=>'', ' '=>''));
|
||||
if (!$iInsee->valideSiren($FUSIONPROJET_SIREN)) {
|
||||
$FUSIONPROJET_SIREN=0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($FUSIONPROJET_SIREN*1<100) $FUSIONPROJET_SIREN='';
|
||||
if ($FUSIONPROJET_SIREN*1<100) $FUSIONPROJET_SIREN = '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
2700 Fusion/Absorption (entitée absorbante)
|
||||
2701 Fusion/Absorption (Entitée absorbante. Entité absorbée inconnue)
|
||||
2702 Fusion/Absorption (Entitée absorbante. Entité absorbée mal SIRENEE)
|
||||
2703 Fusion/Absorption (Entitée absorbante. Entité absorbée non SIRENEE)
|
||||
2720 Fusion/Absorption (entitée absorbée)
|
||||
2721 Fusion/Absorption (entitée absorbée non identifiée)
|
||||
2725 Fusion/Absorption
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Changement de capital
|
||||
$annCapPre=0;
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2100,2101,2102), false);
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0)
|
||||
// Date de la plus récente Annonce changement de capital
|
||||
$ANNONCECAPDATE=$depot['DateParution'];
|
||||
if ($iDep==1) {
|
||||
if ($depot['capitalDev']=='EUR') $CAPITAL_PRE=$depot['capital'];
|
||||
elseif ($depot['capitalDev']=='FRF') $CAPITAL_PRE=round($depot['capital']/6.55957);
|
||||
$annCapPre = 0;
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2100,2101,2102));
|
||||
$tabDepotCpt = array_reverse($tabDepotCpt);
|
||||
$CAPITAL_PRE = 0;
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0) {
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
// Date de la plus récente Annonce changement de capital
|
||||
$ANNONCECAPDATE = $depot['DateParution'];
|
||||
if (count($tabDepotCpt)>1 && $iDep == count($tabDepotCpt)-2) {
|
||||
if ($depot['capitalDev']=='FRF') {
|
||||
$CAPITAL_PRE = round($depot['capital']/6.55957);
|
||||
} else {
|
||||
$CAPITAL_PRE = $depot['capital'];
|
||||
}
|
||||
}
|
||||
|
||||
// Boucle sur les evenements
|
||||
foreach ($depot['evenements'] as $even) {
|
||||
// Evenement 2101 : Modificaition de capital
|
||||
if ($even['CodeEven'] == 2101) {
|
||||
if ($iDep > 0 && $CAPITAL_PRE > 0) {
|
||||
if ($depot['capitalDev']=='FRF') {
|
||||
$annonceCapital = round($depot['capital']/6.55957);
|
||||
} else {
|
||||
$annonceCapital = $depot['capital'];
|
||||
}
|
||||
// Augmentation
|
||||
if ($annonceCapital > $CAPITAL_PRE) {
|
||||
$even['CodeEven'] = 2102;
|
||||
}
|
||||
// Diminution
|
||||
elseif ($annonceCapital < $CAPITAL_PRE) {
|
||||
$even['CodeEven'] = 2100;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch ($even['CodeEven']*1) {
|
||||
case 2100:// Diminution de capital
|
||||
// Diminution de capital
|
||||
case 2100:
|
||||
$ANNONCECAPDIM++;
|
||||
if ($ANNONCECAPDIM==1) {
|
||||
// Date de la plus récente Annonce de diminution de capital
|
||||
$ANNONCECAPDIMDATE=$depot['DateParution'];
|
||||
// Année de la plus récente Annonce diminution de capital
|
||||
$ANNONCECAPDIM_AAF=substr($depot['DateParution'],0,4);
|
||||
} else
|
||||
// Année de la plus ancienne Annonce diminution de capital
|
||||
$ANNONCECAPDIM_AAD=substr($depot['DateParution'],0,4);
|
||||
if ($annCapPre==2102)
|
||||
$ANNONCECAPAUGDIM++; // Augmentation suivie de diminution de capital
|
||||
$annCapPre=2100;
|
||||
if ($ANNONCECAPDIM == 1) {
|
||||
// Année de la plus ancienne Annonce diminution de capital
|
||||
$ANNONCECAPDIM_AAD = substr($depot['DateParution'],0,4);
|
||||
} else {
|
||||
// Date de la plus récente Annonce de diminution de capital
|
||||
$ANNONCECAPDIMDATE = $depot['DateParution'];
|
||||
// Année de la plus récente Annonce diminution de capital
|
||||
$ANNONCECAPDIM_AAF = substr($depot['DateParution'],0,4);
|
||||
}
|
||||
// Augmentation suivie de diminution de capital
|
||||
if ($annCapPre == 2102) {
|
||||
$ANNONCECAPAUGDIM++;
|
||||
}
|
||||
$annCapPre = 2100;
|
||||
break;
|
||||
case 2102:// Augmentation de capital
|
||||
// Augmentation de capital
|
||||
case 2102:
|
||||
$ANNONCECAPAUG++;
|
||||
if ($ANNONCECAPAUG==1) {
|
||||
// Date de la plus récente Annonce Augmentation de capital
|
||||
$ANNONCECAPAUGDATE=$depot['DateParution'];
|
||||
// Année de la plus récente Annonce Augmentation de capital
|
||||
$ANNONCECAPAUG_AAF=substr($depot['DateParution'],0,4);
|
||||
} else
|
||||
// Année de la plus ancienne Annonce Augmentation de capital
|
||||
$ANNONCECAPAUG_AAD=substr($depot['DateParution'],0,4);
|
||||
if ($annCapPre==2100)
|
||||
$ANNONCECAPDIMAUG++; // Diminution suivie de Augmentation de capital
|
||||
$annCapPre=2102;
|
||||
if ($ANNONCECAPAUG == 1) {
|
||||
// Année de la plus ancienne Annonce Augmentation de capital
|
||||
$ANNONCECAPAUG_AAD = substr($depot['DateParution'],0,4);
|
||||
} else {
|
||||
// Date de la plus récente Annonce Augmentation de capital
|
||||
$ANNONCECAPAUGDATE = $depot['DateParution'];
|
||||
// Année de la plus récente Annonce Augmentation de capital
|
||||
$ANNONCECAPAUG_AAF = substr($depot['DateParution'],0,4);
|
||||
}
|
||||
// Diminution suivie de Augmentation de capital
|
||||
if ($annCapPre == 2100){
|
||||
$ANNONCECAPDIMAUG++;
|
||||
}
|
||||
$annCapPre = 2102;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$ANNONCECAP++;
|
||||
|
||||
/** @todo : Récupérer le montant du changement et alimenter ou non cette variable
|
||||
**/
|
||||
$ANNONCECAPSIG++;
|
||||
|
||||
if ($CAPITAL_PRE==0) {
|
||||
// Rechercher le capital à la création ou dans une annonce précédente !
|
||||
$CAPITAL_PRE=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Cessation d'activité avec dissolution
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2202,2203,2204,2210,2212), false);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2202,2203,2204,2210,2212));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
//sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "Indiscore sur $siren : Annonce de Dissolution avec Bilan A", "Dernier Bilan = $BILANDATE et Annonce de dissolution = ".$depot['DateParution']);
|
||||
if ($BILANDATE<str_replace('-','',$depot['DateParution'])*1) {
|
||||
$ANNONCEDISSODATE=$depot['DateParution'];
|
||||
$ANNONCEDISSO=true;
|
||||
}// else
|
||||
// sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "Indiscore sur $siren : Annonce de Dissolution avec Bilan B", "Dernier Bilan = $BILANDATE et Annonce de dissolution = ".$depot['DateParution']);
|
||||
$ANNONCEDISSODATE = $depot['DateParution'];
|
||||
$ANNONCEDISSO = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Poursuite de l'activité malgré la perte de plus de la moitié du capital social
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2314,2319), false);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2314,2319));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
$ANNONCEPOURSDATE= $ANNONCEDISSONONDATE= $depot['DateParution'];
|
||||
$ANNONCEPOURS= $ANNONCEDISSONON= true;
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
$ANNONCEPOURSDATE = $ANNONCEDISSONONDATE = $depot['DateParution'];
|
||||
$ANNONCEPOURS = $ANNONCEDISSONON = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Reconsitution de l'actif net ou de la moitié
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2320,2321), false);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2320,2321));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
$ANNONCERECONDATE=$depot['DateParution'];
|
||||
$ANNONCERECON=true;
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
$ANNONCERECONDATE = $depot['DateParution'];
|
||||
$ANNONCERECON = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Location gérance reçue
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2800,2880,4355), false);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2800,2880,4355));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
$ANNONCELOCDATE=$depot['DateParution'];
|
||||
$ANNONCELOC=true;
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
$ANNONCELOCDATE = $depot['DateParution'];
|
||||
$ANNONCELOC = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Annonces BODACC Mise en sommeil de la société
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(2206), false);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(2206));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
$ANNONCESOMMDATE=$depot['DateParution'];
|
||||
$ANNONCESOMM=true;
|
||||
foreach ($tabDepotCpt as $iDep => $depot) {
|
||||
$ANNONCESOMMDATE = $depot['DateParution'];
|
||||
$ANNONCESOMM = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$timer['bodacc']=microtime(true);
|
||||
|
||||
$ANNONCEOBJET=$tabIdentite['Activite'];
|
||||
$ANNONCEOBJET = $tabIdentite['Activite'];
|
||||
|
||||
if ($tabIdentite['SituationJuridique']=='P') {
|
||||
$ANNONCEPC='Procédure Collective';
|
||||
$tabProCol=$iInsee->getAnnoncesLegales($siren, 0, 'P', false);
|
||||
$tabProCol = $iInsee->annoncesFilter($CompanyAnnonces, 'P');
|
||||
foreach ($tabProCol as $iProcol=>$procol) {
|
||||
foreach ($procol['evenements'] as $even) {
|
||||
if ($iProcol==0) $ANNONCEPC=$even['LibEven'];
|
||||
@ -1752,11 +1790,11 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
// Le SIREN est éliminé du scoring
|
||||
$ELIMINE=true;
|
||||
} elseif ($tabIdentite['SituationJuridique']=='PL') {
|
||||
$ANNONCEPCHISTO=true;
|
||||
$ELIMINE=false;
|
||||
$ANNONCEPC='Plan de continuation/redressement';
|
||||
$tabProCol=$iInsee->getAnnoncesLegales($siren, 0, 'P', false);
|
||||
foreach ($tabProCol as $iProcol=>$procol) {
|
||||
$ANNONCEPCHISTO = true;
|
||||
$ELIMINE = false;
|
||||
$ANNONCEPC = 'Plan de continuation/redressement';
|
||||
$tabProCol = $iInsee->annoncesFilter($CompanyAnnonces, 'P');
|
||||
foreach ($tabProCol as $iProcol => $procol) {
|
||||
foreach ($procol['evenements'] as $even) {
|
||||
if ($iProcol==0) $ANNONCEPC=$even['LibEven'];
|
||||
switch ($even['CodeEven']*1) {
|
||||
@ -1773,14 +1811,12 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
case 1312: // Liquidation Judiciaire avec continuation d'exploitation
|
||||
case 1313: // Liquidation Judiciaire sans remise des accessoires
|
||||
case 1417: // Jugement d'extension de liquidation judiciaire
|
||||
|
||||
// Annonce de liquidation judiciaire
|
||||
$ANNONCELJ=true;
|
||||
|
||||
$ANNONCELJ = true;
|
||||
// Date de l'annonce LJ
|
||||
$ANNONCELJDATE=$procol['dateJugement'];
|
||||
$ANNONCEDATE=$ANNONCEPCDATE=$procol['dateJugement'];
|
||||
$TRIBUNAL_PROCOL=strtr($procol['Tribunal'],array('TC '=>'Tribunal de Commerce de '));
|
||||
$ANNONCELJDATE = $procol['dateJugement'];
|
||||
$ANNONCEDATE = $ANNONCEPCDATE = $procol['dateJugement'];
|
||||
$TRIBUNAL_PROCOL = strtr($procol['Tribunal'], array('TC '=>'Tribunal de Commerce de '));
|
||||
break;
|
||||
case 1200: // Redressement Judiciaire
|
||||
if (substr($procol['dateFinObservation'],0,4)*1>0) $ANNONCEPC_OBS=true;
|
||||
@ -1848,7 +1884,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$tabProCol=$iInsee->getAnnoncesLegales($siren, 0, 'PH', false);
|
||||
$tabProCol = $iInsee->annoncesFilter($CompanyAnnonces, 'PH');
|
||||
if (count($tabProCol)>0) $ANNONCEPCHISTO=true;
|
||||
else $ANNONCEPCHISTO=false;
|
||||
if ($tabIdentite['Actif']==0) $ELIMINE=true;
|
||||
@ -1856,7 +1892,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
|
||||
/** Annonces d'Homologation **/
|
||||
$tabDepotCpt=$iInsee->getAnnoncesLegales($siren, 0, array(1050,1550), false, true);
|
||||
$tabDepotCpt = $iInsee->annoncesFilter($CompanyAnnonces, array(1050,1550));
|
||||
if (is_array($tabDepotCpt) && count($tabDepotCpt)>0){
|
||||
foreach ($tabDepotCpt as $iDep=>$depot) {
|
||||
if ($iDep==0)
|
||||
@ -1866,15 +1902,15 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
|
||||
/** Ventes Cessions en tant que vendeur **/
|
||||
$tabProCol=$iInsee->getAnnoncesLegales($siren, 0, 'V', false);
|
||||
$tabProCol = $iInsee->annoncesFilter($CompanyAnnonces, 'V');
|
||||
$ANNONCEVC=0; // Nombre d'annonce de VC (vendeur)
|
||||
$ANNONCEVC_OBJ=$ANNONCEVCDATE=$ANNONCEVC_MT='';
|
||||
|
||||
foreach ($tabProCol as $iProcol=>$procol) {
|
||||
$ANNONCEVC++;
|
||||
if ($iProcol==0) {
|
||||
foreach ($procol['evenements'] as $even)
|
||||
$ANNONCEVC_OBJ[]=$even['LibEven'];
|
||||
foreach ($procol['evenements'] as $even) {
|
||||
$ANNONCEVC_OBJ[]=$even['LibEven'];
|
||||
}
|
||||
$ANNONCEVC_OBJ=implode(', ', $ANNONCEVC_OBJ);
|
||||
$ANNONCEVCDATE=$procol['dateJugement'];
|
||||
$ANNONCEVC_MT=$procol['montantVente']; // Montant de la vente
|
||||
@ -1901,19 +1937,19 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
* Solvabilité
|
||||
*/
|
||||
$isolv = new MSolvabilite(
|
||||
$siren,
|
||||
$naf,
|
||||
$tabIdentite['EffEnTr'],
|
||||
$tabIdentite['Effectif']*1,
|
||||
$tabIdentite['CP'],
|
||||
$fj,
|
||||
$tabIdentite['Capital'],
|
||||
$tabIdentite['CapitalDev'],
|
||||
$tabIdentite['DateCreaEn'],
|
||||
$tabIdentite['DateCreaEt'],
|
||||
'',
|
||||
$RECME,
|
||||
$iDb
|
||||
$siren,
|
||||
$naf,
|
||||
$tabIdentite['EffEnTr'],
|
||||
$tabIdentite['Effectif']*1,
|
||||
$tabIdentite['CP'],
|
||||
$fj,
|
||||
$tabIdentite['Capital'],
|
||||
$tabIdentite['CapitalDev'],
|
||||
$tabIdentite['DateCreaEn'],
|
||||
$tabIdentite['DateCreaEt'],
|
||||
'',
|
||||
$RECME,
|
||||
$iDb
|
||||
);
|
||||
$noteStructure=$isolv->getSolvabilite();
|
||||
$timer['solv']=microtime(true);
|
||||
@ -3836,7 +3872,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
if ($indiScore==$indiScorePre && $ENCOURS==$encoursPre && $dateScore<>0 )
|
||||
{
|
||||
$tabUpdate2 = array('sourceModif'=>$sourceModif, 'nbModifs'=>$nbModifs);
|
||||
if (!$iDb->update('scores_surveillance', $tabUpdate2, "siren=$siren", false, 0, true)) {
|
||||
if (!$iDb->update('jo.scores_surveillance', $tabUpdate2, "siren=$siren", false, 0, true)) {
|
||||
debugLog('W', 'Erreur lors de la MAJ du score en surveillance pour '. $tabIdentite['Nom'], __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
}
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ function clientSphinx(&$formR)
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
break;
|
||||
case 2:
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -339,6 +339,7 @@ class Scores_Ws_Server
|
||||
* @var unknown_type
|
||||
*/
|
||||
public $listError = array(
|
||||
'0000' => "Erreur indeterminé",
|
||||
'0900' => "Identifiant ou mot de passe incorrect",
|
||||
'0901' => "Accès WS non authorisé pour cet utilisateur",
|
||||
'0902' => "Méthode non authorisée dans votre profil",
|
||||
@ -684,8 +685,14 @@ class Scores_Ws_Server
|
||||
else {
|
||||
$sql->where('u.login=?', $login);
|
||||
}
|
||||
$resultId = $userM->fetchAll($sql);
|
||||
|
||||
try {
|
||||
$resultId = $userM->fetchAll($sql);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
$c = Zend_Registry::get('config');
|
||||
file_put_contents($c->profil->path->data.'/log/application.log',
|
||||
date('Y-m-d H:i:s').'- AUTH : '.$e->getMessage()."\n", FILE_APPEND);
|
||||
return '0000';
|
||||
}
|
||||
/**
|
||||
* No user, deleted or disable
|
||||
*/
|
||||
@ -1122,6 +1129,7 @@ class Scores_Ws_Server
|
||||
'login' => $login,
|
||||
'authenticate' => $authenticate,
|
||||
'ip' => $ip,
|
||||
'dateInsert' => date('YmdHis'),
|
||||
);
|
||||
try {
|
||||
$authLogM = new Application_Model_Sdv1UtilisateursAuthLog();
|
||||
|
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'Scores_Auth_Adapter_Db' => dirname(__FILE__) . '//Auth/Adapter/Db.php',
|
||||
'Scores_Auth_Adapter_Ws' => dirname(__FILE__) . '//Auth/Adapter/Ws.php',
|
||||
'Scores_Locale_String' => dirname(__FILE__) . '//Locale/String.php',
|
||||
'Scores_Mail_Method' => dirname(__FILE__) . '//Mail/Method.php',
|
||||
'Scores_Validate_IpInNetwork' => dirname(__FILE__) . '//Validate/IpInNetwork.php',
|
||||
'Scores_Wkhtml_Pdf' => dirname(__FILE__) . '//Wkhtml/Pdf.php',
|
||||
'Scores_Ws_Doc' => dirname(__FILE__) . '//Ws/Doc.php',
|
||||
'Scores_Ws_Exception' => dirname(__FILE__) . '//Ws/Exception.php',
|
||||
'Scores_Ws_Form_GetIdentite' => dirname(__FILE__) . '//Ws/Form/GetIdentite.php',
|
||||
'Scores_Ws_Server' => dirname(__FILE__) . '//Ws/Server.php',
|
||||
'Scores_Ws_Trigger' => dirname(__FILE__) . '//Ws/Trigger.php',
|
||||
);
|
@ -16,7 +16,7 @@ class SdMetier_Search_Engine
|
||||
if ($version == 1){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif ($version == 2){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,6 @@ class SdMetier_Sfr_Scoring
|
||||
}
|
||||
|
||||
$classInsee = new MInsee();
|
||||
$classInsee->AnnoncesInMemory = true;
|
||||
|
||||
//Values are already define ?
|
||||
if ( $this->ValDateCalculIndiscore === null ) {
|
||||
@ -614,8 +613,8 @@ class SdMetier_Sfr_Scoring
|
||||
if ($this->debug) file_put_contents('sfr.log', "ValInseeAge = ".$this->ValInseeAge."\n", FILE_APPEND);
|
||||
|
||||
//Vérification validité du score
|
||||
$dateUpdate = new Zend_Date(substr($this->ValDateUpdate,0,10), 'yyyy-MM-dd');
|
||||
$dateNow = new Zend_Date();
|
||||
$dateUpdate = new Zend_Date(substr($this->ValDateUpdate,0,10), 'yyyy-MM-dd');
|
||||
$diffUpdate = $dateNow->sub($dateUpdate);
|
||||
$measureUpdate = new Zend_Measure_Time($diffUpdate->toValue(), Zend_Measure_Time::SECOND);
|
||||
$measureUpdate->convertTo(Zend_Measure_Time::MONTH);
|
||||
@ -626,7 +625,7 @@ class SdMetier_Sfr_Scoring
|
||||
$this->ValIndiscore = null;
|
||||
$this->ValDateCalculIndiscore = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//GetAnnoncesLegales
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
// Generated by ZF's ./bin/classmap_generator.php
|
||||
return array(
|
||||
'SdMetier_Graydon_Service' => dirname(__FILE__) . '//Graydon/Service.php',
|
||||
'SdMetier_Infogreffe_DocAC' => dirname(__FILE__) . '//Infogreffe/DocAC.php',
|
||||
'SdMetier_Infogreffe_DocBI' => dirname(__FILE__) . '//Infogreffe/DocBI.php',
|
||||
'SdMetier_Infogreffe_DocST' => dirname(__FILE__) . '//Infogreffe/DocST.php',
|
||||
'SdMetier_Infogreffe_Service' => dirname(__FILE__) . '//Infogreffe/Service.php',
|
||||
'SdMetier_Intersud_Service' => dirname(__FILE__) . '//Intersud/Service.php',
|
||||
'SdMetier_Rnvp_Detail' => dirname(__FILE__) . '//Rnvp/Detail.php',
|
||||
'SdMetier_Search_Engine' => dirname(__FILE__) . '//Search/Engine.php',
|
||||
'SdMetier_Sfr_Compile' => dirname(__FILE__) . '//Sfr/Compile.php',
|
||||
'SdMetier_Sfr_Scoring' => dirname(__FILE__) . '//Sfr/Scoring.php',
|
||||
);
|
1832
library/Vendors/sphinxapi/sphinxapi-2.2.9.php
Normal file
1832
library/Vendors/sphinxapi/sphinxapi-2.2.9.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,111 +0,0 @@
|
||||
<?php
|
||||
class Configure
|
||||
{
|
||||
/**
|
||||
* Configuration object
|
||||
* @var Zend_Config_Ini
|
||||
*/
|
||||
protected $profil;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->readConfig();
|
||||
$this->_defineDb();
|
||||
$this->_definePath();
|
||||
$this->_defineSphinx();
|
||||
$this->_defineMail();
|
||||
$this->_defineInfogreffe();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read config application.ini
|
||||
*/
|
||||
protected function readConfig()
|
||||
{
|
||||
if ( Zend_Registry::isRegistered('config') ) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$this->profil = $c->profil;
|
||||
} else {
|
||||
$c = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', 'production');
|
||||
$this->profil = $c->profil;
|
||||
}
|
||||
}
|
||||
|
||||
protected function _defineDb()
|
||||
{
|
||||
if ( $this->profil->db->metier ) {
|
||||
define('MYSQL_HOST', $this->profil->db->metier->params->host);
|
||||
define('MYSQL_USER', $this->profil->db->metier->params->username);
|
||||
define('MYSQL_PASS', $this->profil->db->metier->params->password);
|
||||
define('MYSQL_DEFAULT_DB', 'jo');
|
||||
define('MYSQL_SQL_LOG', 'NONE');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function _definePath()
|
||||
{
|
||||
//Use of realpath
|
||||
|
||||
define('BODACC_LOCAL_DIR' , '/home/data/bodacc/');
|
||||
define('JAL_LOCAL_DIR' , '/home/data/jal/');
|
||||
define('HUGIN_LOCAL_DIR' , '/home/data/infosreg/hugin/');
|
||||
define('ACTUSNEWS_LOCAL_DIR' , '/home/data/infosreg/actusnews/');
|
||||
define('DIRELEASE_LOCAL_DIR' , '/home/data/infosreg/direlease/');
|
||||
define('LESECHOS_LOCAL_DIR' , '/home/data/infosreg/lesechos/');
|
||||
define('BUSINESSWIRE_LOCAL_DIR_INCOMING' , '/home/data/ftp/businesswire/');
|
||||
define('BUSINESSWIRE_LOCAL_DIR' , '/home/data/infosreg/businesswire/');
|
||||
|
||||
define('SECURE_STORAGE' , $this->profil->path->secure.'/');
|
||||
define('DOC_WEB_LOCAL' , $this->profil->path->files.'/');
|
||||
define('DOC_WEB_URL' , '/fichier/');
|
||||
define('LOG_PATH' , $this->profil->path->data.'/log');
|
||||
}
|
||||
|
||||
protected function _defineSphinx()
|
||||
{
|
||||
// Entreprise
|
||||
define('SPHINX_ENT_HOST', $this->profil->sphinx->ent->host);
|
||||
define('SPHINX_ENT_PORT', intval($this->profil->sphinx->ent->port));
|
||||
define('SPHINX_ENT_VERSION', $this->profil->sphinx->ent->version);
|
||||
|
||||
// Dirigeants
|
||||
define('SPHINX_DIR_HOST', $this->profil->sphinx->dir->host);
|
||||
define('SPHINX_DIR_PORT', intval($this->profil->sphinx->dir->port));
|
||||
define('SPHINX_DIR_VERSION', $this->profil->sphinx->dir->version);
|
||||
|
||||
// Historique
|
||||
define('SPHINX_HISTO_HOST', $this->profil->sphinx->histo->host);
|
||||
define('SPHINX_HISTO_PORT', intval($this->profil->sphinx->histo->port));
|
||||
define('SPHINX_HISTO_VERSION', $this->profil->sphinx->histo->version);
|
||||
|
||||
// Actionnaire
|
||||
define('SPHINX_ACT_HOST', $this->profil->sphinx->act->host);
|
||||
define('SPHINX_ACT_PORT', intval($this->profil->sphinx->act->port));
|
||||
define('SPHINX_ACT_VERSION', $this->profil->sphinx->act->version);
|
||||
|
||||
//Old
|
||||
define('SPHINX_HOST', $this->profil->sphinx->ent->host);
|
||||
define('SPHINX_PORT', intval($this->profil->sphinx->ent->port));
|
||||
}
|
||||
|
||||
protected function _defineMail()
|
||||
{
|
||||
//Messagerie
|
||||
define('SMTP_HOST', $this->profil->mail->smtp_host);
|
||||
define('SMTP_PORT', $this->profil->mail->smtp_port);
|
||||
define('SMTP_USER', '');
|
||||
define('SMTP_PASS', '');
|
||||
}
|
||||
|
||||
protected function _defineInfogreffe()
|
||||
{
|
||||
define('INFOGREFFE_DISPO_WEB', false);
|
||||
define('INFOGREFFE_DISPO_WS', false);
|
||||
define('INFOGREFFE_WS_URL', 'https://webservices.infogreffe.fr/WSContextInfogreffe/INFOGREFFE');
|
||||
define('INFOGREFFE_WS_USER', '85000109');
|
||||
define('INFOGREFFE_WS_PASS', '166');
|
||||
}
|
||||
|
||||
}
|
@ -196,6 +196,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->dir2LieuNaiss = prepareString($entrep['dir2LieuNaiss']); // Ajouté le 4 08 2009
|
||||
$identite->Rivoli = $entrep['Rivoli'];
|
||||
|
||||
$identite->InfosIris = new stdClass();
|
||||
$identite->InfosIris->codIris = $entrep['InfosIris']['codIris'];
|
||||
$identite->InfosIris->codComIris = $entrep['InfosIris']['codComIris'];
|
||||
$identite->InfosIris->libIris = prepareString($entrep['InfosIris']['libIris']);
|
||||
@ -203,6 +204,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->InfosIris->evoIris = $entrep['InfosIris']['evoIris'];
|
||||
$identite->InfosIris->trIris = $entrep['InfosIris']['trIris'];
|
||||
$identite->InfosIris->grdQuartier = $entrep['InfosIris']['grdQuartier'];
|
||||
|
||||
$identite->NatureActivite = $entrep['NatureActivite']; // Nature de l'activité
|
||||
$identite->OrigineCreation = $entrep['OrigineCreation']; // Origine de la création
|
||||
$identite->TypeExploitation = $entrep['TypeExploitation'];
|
||||
@ -210,6 +212,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->Saisonnalite = $entrep['Saisonnalite']; // P=Activité permanente / S=Activité saisonnière
|
||||
$identite->SurfaceMagasin = $entrep['ACTISURF']*1; // 0=N/D, 1=inf. à 300m2,2=300 à 400m2, 3=400 à 2500m2, 4=sup. à 2500m2
|
||||
$identite->SituationJuridique = $entrep['SituationJuridique'];
|
||||
|
||||
$identite->Bilan = new stdClass();
|
||||
$identite->Bilan->Millesime = $entrep['bilanAnnee'];
|
||||
$identite->Bilan->Cloture = $entrep['bilanDate']; //@todo : date
|
||||
$identite->Bilan->Duree = $entrep['bilanMois'];
|
||||
@ -2739,7 +2743,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
global $tva, $mBil, $efftr, $tabInfla;
|
||||
require_once 'Metier/scores/classMRatios.php';
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans>0)
|
||||
@ -3491,7 +3495,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
if (strlen($siret) == 14) $nic = substr($siret,9,5);
|
||||
elseif (strlen($siret) == 9) $nic = '';
|
||||
|
||||
$iInsee = new MInsee();
|
||||
$iDb = new WDB();
|
||||
$iInsee = new MInsee($iDb);
|
||||
|
||||
$rep = $iInsee->getEtablissements($siren, $nic, $deb, $nbRep, $maxRep, $dep, $actif, $siege);
|
||||
if ( count($rep['reponses'])==0 && $dep>0 ) {
|
||||
@ -3571,7 +3576,6 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
else {
|
||||
$iDb = new WDB();
|
||||
$iDb->insert('jo.siren_inexistants', array(
|
||||
'siren' => $siren,
|
||||
'nic' => $nic,
|
||||
@ -4260,23 +4264,43 @@ class Entreprise extends Scores_Ws_Server
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilan = $mBil->getBilan($millesime, $typeBilan, $ref, true);
|
||||
|
||||
// --- Bilan condidentiel
|
||||
|
||||
|
||||
// --- Génération du format pour le webservice
|
||||
$txtKey = array(
|
||||
'SIREN',
|
||||
'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE',
|
||||
'DATE_CLOTURE_PRE',
|
||||
'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE',
|
||||
'MONNAIE',
|
||||
'CONSOLIDE',
|
||||
'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE',
|
||||
'SOURCE',
|
||||
'devise',
|
||||
'ID_BILAN_SD',
|
||||
'DATE_BILAN_SD',
|
||||
'TOP_CONFIDENTIEL',
|
||||
);
|
||||
|
||||
$resultBilan = new Bilan();
|
||||
$tabPoste = array();
|
||||
foreach($tabBilan as $key => $value){
|
||||
if(!in_array($key, array('SIREN', 'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE', 'DATE_CLOTURE_PRE', 'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE', 'MONNAIE', 'CONSOLIDE', 'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise'))){
|
||||
$resultPoste = new BilanPoste();
|
||||
$resultPoste->id = $key;
|
||||
$resultPoste->val = $value;
|
||||
$tabPoste[] = $resultPoste;
|
||||
foreach($tabBilan as $key => $value) {
|
||||
if( in_array($key, $txtKey)) {
|
||||
$resultBilan->$key = $value;
|
||||
} else {
|
||||
$resultBilan->$key = $value;
|
||||
$resultPoste = new BilanPoste();
|
||||
$resultPoste->id = $key;
|
||||
$resultPoste->val = $value;
|
||||
$tabPoste[] = $resultPoste;
|
||||
}
|
||||
}
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
$resultBilan->POSTES = $tabPoste;
|
||||
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
return $resultBilan;
|
||||
}
|
||||
|
||||
@ -4615,7 +4639,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
//Ratios
|
||||
$mBil = new MBilans($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans > 0) {
|
||||
|
@ -205,6 +205,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->dir2LieuNaiss = prepareString($entrep['dir2LieuNaiss']);
|
||||
$identite->Rivoli = $entrep['Rivoli'];
|
||||
|
||||
$identite->InfosIris = new stdClass();
|
||||
$identite->InfosIris->codIris = $entrep['InfosIris']['codIris'];
|
||||
$identite->InfosIris->codComIris = $entrep['InfosIris']['codComIris'];
|
||||
$identite->InfosIris->libIris = prepareString($entrep['InfosIris']['libIris']);
|
||||
@ -212,6 +213,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->InfosIris->evoIris = $entrep['InfosIris']['evoIris'];
|
||||
$identite->InfosIris->trIris = $entrep['InfosIris']['trIris'];
|
||||
$identite->InfosIris->grdQuartier = $entrep['InfosIris']['grdQuartier'];
|
||||
|
||||
$identite->NatureActivite = $entrep['NatureActivite']; // Nature de l'activité
|
||||
$identite->OrigineCreation = $entrep['OrigineCreation']; // Origine de la création
|
||||
$identite->TypeExploitation = $entrep['TypeExploitation'];
|
||||
@ -219,6 +221,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$identite->Saisonnalite = $entrep['Saisonnalite']; // P=Activité permanente / S=Activité saisonnière
|
||||
$identite->SurfaceMagasin = $entrep['ACTISURF']*1; // 0=N/D, 1=inf. à 300m2,2=300 à 400m2, 3=400 à 2500m2, 4=sup. à 2500m2
|
||||
$identite->SituationJuridique = $entrep['SituationJuridique'];
|
||||
|
||||
$identite->Bilan = new stdClass();
|
||||
$identite->Bilan->Millesime = $entrep['bilanAnnee'];
|
||||
$identite->Bilan->Cloture = $entrep['bilanDate']; //@todo : date
|
||||
$identite->Bilan->Duree = $entrep['bilanMois'];
|
||||
@ -246,7 +250,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$autreSiren->type = $entrep['AutreSiren']['listeSiren']['type'];
|
||||
$tabAutreSiren[] = $autreSiren;
|
||||
}
|
||||
$identite->AutreSiren = $tabAutreSiren;
|
||||
$identite->AutreSiren = $tabAutreSiren;
|
||||
|
||||
$tabAutreSiret = array();
|
||||
if (count($entrep['AutreSiret'])) {
|
||||
@ -274,7 +278,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$tabAutreSiret[] = $autreSiret;
|
||||
}
|
||||
}
|
||||
$identite->AutreSiret = $tabAutreSiret;
|
||||
$identite->AutreSiret = $tabAutreSiret;
|
||||
|
||||
$identite->DateMajINSEE = $entrep['DateMajINSEE']; //@todo : date
|
||||
$identite->DateMajRCS = $entrep['DateMajRCS']; //@todo : date
|
||||
@ -646,7 +650,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$InfoRNVP->QualityLabel = '';
|
||||
$tabCQAdrs = array(
|
||||
'10' => "Adresse correcte",
|
||||
'20' => "Adresse correcte (Voie non reconue, mais il s'agit d'un cedex ou BP)",
|
||||
'20' => "Adresse correcte (Voie non reconnue, mais il s'agit d'un cedex ou BP)",
|
||||
'21' => "Petite ville, Numéro de facade hors borne.",
|
||||
'22' => "Petite ville, Numéro de facade absent (le reste de l'adresse est correcte)",
|
||||
'23' => "Grande ville, Numéro de facade hors borne.",
|
||||
|
@ -40,6 +40,7 @@ class Gestion extends Scores_Ws_Server
|
||||
'login' => $login,
|
||||
'authenticate' => 'OK',
|
||||
'ip' => $ip,
|
||||
'dateInsert' => date('YmdHis'),
|
||||
));
|
||||
} catch (Zend_Db_Exception $e) {}
|
||||
|
||||
@ -328,6 +329,7 @@ class Gestion extends Scores_Ws_Server
|
||||
$sql = $serviceM->select()
|
||||
->from($serviceM, array('id', 'Code', 'Label', 'Editable', 'Active'))
|
||||
->where('Deleted=?', 0)
|
||||
->where('Active=?', 1)
|
||||
->where('IdClient=?', $id);
|
||||
$result = $serviceM->fetchAll($sql);
|
||||
$services = array();
|
||||
@ -545,7 +547,7 @@ class Gestion extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
if ( count($dataToUpdate) > 0 ) {
|
||||
$dataToUpdate['DateUpdate'] = date('Y-m-d H:i:s');
|
||||
$dataToUpdate['DateUpdate'] = date('YmdHis');
|
||||
try {
|
||||
$serviceM->update($dataToUpdate, 'id='.$id);
|
||||
return true;
|
||||
|
@ -2370,7 +2370,7 @@ class Interne extends Scores_Ws_Server
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -2328,7 +2328,7 @@ class Interne extends Scores_Ws_Server
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -1252,7 +1252,7 @@ class Interne extends Scores_Ws_Server
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
|
@ -1190,7 +1190,7 @@ class Interne extends Scores_Ws_Server
|
||||
if (SPHINX_HISTO_VERSION == 1){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-0.9.9.php';
|
||||
} elseif (SPHINX_HISTO_VERSION == 2){
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.1.5.php';
|
||||
require_once 'Vendors/sphinxapi/sphinxapi-2.2.9.php';
|
||||
}
|
||||
|
||||
$cl = new SphinxClient();
|
||||
@ -1478,175 +1478,102 @@ class Interne extends Scores_Ws_Server
|
||||
public function getListeFichierSurv($login, $ref='*', $nomFic='')
|
||||
{
|
||||
$this->authenticate();
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = "/mnt/clients/oldcrm";
|
||||
|
||||
if (empty($ref)) $ref = '*';
|
||||
if (empty($nomFic)) $nomFic = '';
|
||||
$error = new ErrorType();
|
||||
//debugLog('I',"getListeFichierSurv pour $login, $ref, $nomFic",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
$tabFichier=$tabDates=array();
|
||||
$numAbo=substr($ref, 0,5);
|
||||
$tabFichier = $tabDates = array();
|
||||
$numAbo = substr($ref, 0,5);
|
||||
if (strtolower($login)=='vwbank') {
|
||||
$repClient='volkswagen bank';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDCFTVWBANK';
|
||||
$numAbo=$ref='19300';
|
||||
$numAbo = $ref = '19300';
|
||||
} elseif (substr($login,0,6)=='apicil') {
|
||||
$repClient='apicil';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDCFTAPICIL';
|
||||
$numAbo=$ref='';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='omni04') {
|
||||
$repClient='aggm mederic ';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDFTSOMNIREP';
|
||||
$numAbo=$ref='';
|
||||
} elseif (strtolower($login)=='bodacca3m') {
|
||||
$repClient='aggm mederic ';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='bodacca3m' /*|| strtolower($login)=='mricois'*/) {
|
||||
$ficClient='surveillanceBodacc_SURBODPRDFTSMEDERIC';
|
||||
$numAbo=$ref='';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='bodaccomni') {
|
||||
$repClient='aggm mederic ';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDFTSOMNIREP';
|
||||
$numAbo=$ref='';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='bodacccrr') {
|
||||
$repClient='aggm mederic ';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDFTSCRR';
|
||||
$numAbo=$ref='';
|
||||
} elseif (strtolower($login)=='cpcambr13' || strtolower($login)=='cpcambr14') {
|
||||
$repClient='cpcam des bouches du rhône';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='cpcambr13' || strtolower($login)=='cpcambr14' /*|| strtolower($login)=='mricois'*/) {
|
||||
$ficClient='diffusionBodacc_DIFBODPRDMAICPCAM13';
|
||||
$numAbo=$ref='';
|
||||
$numAbo = $ref = '';
|
||||
} elseif (strtolower($login)=='frbsurveillance'){
|
||||
$repClient='france boissons';
|
||||
$ficClient='surveillanceBodacc_SURBODPRDFTPFBOISSON';
|
||||
$numAbo = $ref = '';
|
||||
} else {
|
||||
$repClient='cnasea';
|
||||
$ficClient='surveillanceBodacc_SURBODTSTFTSCNASEA';
|
||||
$numAbo = $ref = '';
|
||||
}
|
||||
$dh = opendir(DOC_WEB_LOCAL."clients/$repClient/");
|
||||
if (!$dh) {
|
||||
@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, $nomFic", "Impossible d'ouvrir le dossier '/home/data/clients/$repClient/'");
|
||||
$error->errnum = 1;
|
||||
$error->errmsg = "Impossible d'ouvrir le dossier client";
|
||||
|
||||
// --- Livraison fichier
|
||||
if ($nomFic!='') {
|
||||
$directory = $c->profil->path->files;
|
||||
$ficLength = strlen($ficClient . $numAbo);
|
||||
if (file_exists($path.'/'.$nomFic) && substr($nomFic, 0, $ficLength) == $ficClient . $numAbo) {
|
||||
if (!file_exists($directory."/$nomFic.bz2") || filesize($directory."/$nomFic.bz2") <= 14) {
|
||||
$string = file_get_contents($path."/$nomFic");
|
||||
$bz = bzopen($directory."/$nomFic.bz2",'w');
|
||||
if ($bz) {
|
||||
bzwrite($bz, $string, strlen($string));
|
||||
bzclose($bz);
|
||||
}
|
||||
}
|
||||
$tabFichier[] = $nomFic;
|
||||
} else {
|
||||
$error->errnum = 1;
|
||||
$error->errmsg = "Impossible d'ouvrir le fichier client";
|
||||
}
|
||||
} else {
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if ($filename<>'.' && $filename<>'..' && substr($filename, -4)=='.csv' && substr($filename,0,42)==$ficClient.$numAbo) {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[]=substr($filename,43,8);
|
||||
$tabClients[]=substr($filename,0,42);
|
||||
}
|
||||
elseif ($ref=='*' && $filename<>'.' && $filename<>'..' && substr($filename, -4)=='.csv' && substr($filename,0,37)==$ficClient && substr($filename,37,1)<>'_') {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[]=substr($filename,43,8);
|
||||
$tabClients[]=substr($filename,0,42);
|
||||
}
|
||||
elseif ($filename<>'.' && $filename<>'..' && substr($filename, -4)=='.csv' && substr($filename,0,37)==$ficClient && substr($filename,37,1)=='_' && $repClient=='apicil') {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[]=substr($filename,38,8);
|
||||
$tabClients[]=substr($filename,0,37);
|
||||
}
|
||||
elseif ($filename<>'.' && $filename<>'..' && substr($filename, -4)=='.csv' && substr($filename,0,38)==$ficClient && substr($filename,38,1)=='_' && $repClient=='aggm mederic ') {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[]=substr($filename,39,8);
|
||||
$tabClients[]=substr($filename,0,38);
|
||||
}
|
||||
//@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, $nomFic : fichier lu '$filename'", "Fichier lu '$filename'");
|
||||
/*
|
||||
elseif ( $ficClient=='surveillanceBodacc_SURBODPRDFTPFBOISSON' && substr($filename,0,strlen($ficClient))==$ficClient && $repClient=='france boissons') {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[]=substr($filename,strlen($ficClient)+1,8);
|
||||
$tabClients[]=substr($filename,0,strlen($ficClient));
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Tableau des noms de fichier **/
|
||||
sort($tabFichier);
|
||||
/** Tableau des dates de livraisons **/
|
||||
$tabDates=array_unique($tabDates);
|
||||
sort($tabDates);
|
||||
/** Tableau des Clients **/
|
||||
$tabClients=array_unique($tabClients);
|
||||
sort($tabClients);
|
||||
//return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'results'=>$tabDates);
|
||||
// --- Lecture du repertoire
|
||||
$dh = opendir($path."/");
|
||||
if ($dh) {
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if ($filename == '.' && $filename =='..') continue;
|
||||
if (substr($filename, -4) != '.csv') continue;
|
||||
$ficLength = strlen($ficClient . $numAbo);
|
||||
if (substr($filename, 0, $ficLength) == $ficClient . $numAbo) {
|
||||
$tabFichier[] = $filename;
|
||||
$tabDates[] = substr($filename, $ficLength + 1, 8);
|
||||
$tabClients[] = substr($filename, 0, $ficLength);
|
||||
}
|
||||
}
|
||||
|
||||
/*@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, $nomFic",
|
||||
"Fichiers :".EOL.
|
||||
print_r($tabFichier, true).
|
||||
"Dates:".EOL.
|
||||
print_r($tabDates, true).
|
||||
"Clients :".EOL.
|
||||
print_r($tabClients, true)
|
||||
);*/
|
||||
// Tableau des noms de fichier
|
||||
sort($tabFichier);
|
||||
// Tableau des dates de livraisons
|
||||
$tabDates = array_unique($tabDates);
|
||||
sort($tabDates);
|
||||
// Tableau des Clients
|
||||
$tabClients = array_unique($tabClients);
|
||||
sort($tabClients);
|
||||
rsort($tabFichier);
|
||||
} else {
|
||||
$error->errnum = 1;
|
||||
$error->errmsg = "Impossible d'ouvrir le dossier client";
|
||||
}
|
||||
}
|
||||
|
||||
if ($ref=='*') {
|
||||
$tabFichier = array();
|
||||
// Boucle sur les dates de livraison
|
||||
foreach ($tabDates as $dateFic) {
|
||||
if (strlen($dateFic)<>8) continue;
|
||||
if (!file_exists(DOC_WEB_LOCAL."clients/$repClient/$ficClient".'_'."$dateFic.csv") ||
|
||||
filesize(DOC_WEB_LOCAL."clients/$repClient/$ficClient".'_'."$dateFic.csv")==0) {
|
||||
|
||||
$fpW=fopen(DOC_WEB_LOCAL."clients/$repClient/$ficClient".'_'."$dateFic.csv",'w');
|
||||
$entete=true;
|
||||
// Boucle afin de vérifier si on est sur le bon client
|
||||
foreach ($tabClients as $nomClient) {
|
||||
$dh = opendir(DOC_WEB_LOCAL."clients/$repClient/");
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if (substr($filename,0,51)==$nomClient.'_'.$dateFic && substr($filename,-4)=='.csv') {
|
||||
$fichier=$filename;
|
||||
//break;
|
||||
}
|
||||
}
|
||||
$fpR=fopen(DOC_WEB_LOCAL."clients/$repClient/$fichier",'r');
|
||||
//return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'results'=>array(($fichier)));//die;
|
||||
if ($fpR) {
|
||||
while (!feof($fpR)) {
|
||||
$ligne=trim(fgets($fpR));
|
||||
if (substr($ligne,0,5)=='Siren' && $entete==true) {
|
||||
fwrite($fpW, 'SITE;'.$ligne.EOL);
|
||||
$entete=false;
|
||||
}
|
||||
elseif (substr($ligne,0,5)<>'Siren' && trim($ligne)<>'') {
|
||||
fwrite($fpW, strtr($nomClient, array('surveillanceBodacc_SURBODTSTFTS'=>'',
|
||||
'surveillanceBodacc_SURBODPRDCFT'=>'')).';'.$ligne.EOL);
|
||||
}
|
||||
}
|
||||
fclose($fpR);
|
||||
}
|
||||
}
|
||||
fclose($fpW);
|
||||
}
|
||||
if (strlen($dateFic)==8)
|
||||
$tabFichier[]=$ficClient.'_'.$dateFic.'.csv';
|
||||
}
|
||||
}
|
||||
rsort($tabFichier);
|
||||
|
||||
if ($nomFic<>'') {
|
||||
//@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, /home/data/clients/$repClient/$nomFic", 'Avant BZ2');
|
||||
if (!file_exists(DOC_WEB_LOCAL."/csv/$nomFic.bz2") ||
|
||||
filesize(DOC_WEB_LOCAL."/csv/$nomFic.bz2")<=14) {
|
||||
$string=file_get_contents("/home/data/clients/$repClient/$nomFic");
|
||||
if ($string===false) {
|
||||
@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, $nomFic", "Ouverture impossible du fichier '/home/data/clients/$repClient/$nomFic'");
|
||||
}
|
||||
$bz = bzopen(DOC_WEB_LOCAL."/csv/$nomFic.bz2",'w');
|
||||
if ($bz) {
|
||||
bzwrite($bz, $string, strlen($string));
|
||||
bzclose($bz);
|
||||
}
|
||||
} /*else
|
||||
@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, /home/data/clients/$repClient/$nomFic", 'Sans BZ2');
|
||||
@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "getListeFichierSurv pour $login, $ref, /home/data/clients/$repClient/$nomFic", 'Après BZ2');
|
||||
*/
|
||||
}
|
||||
debugLog('I',"getListeFichierSurv pour $login, $ref, $nomFic : nb fichiers=".count($tabFichier),__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
|
||||
if ($_SERVER['SERVER_PORT']!='80'){
|
||||
$hostname.= ':'.$_SERVER['SERVER_PORT'];
|
||||
}
|
||||
$result = array();
|
||||
foreach($tabFichier as $fichier){
|
||||
$retFichier = new ListeFichierSurv();
|
||||
$retFichier->UrlFichier = $hostname.'/data/csv/'.$fichier;
|
||||
$result[] = $retFichier;
|
||||
}
|
||||
$result = array();
|
||||
if (count($tabFichier) > 0) {
|
||||
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
|
||||
if ($_SERVER['SERVER_PORT'] != '80'){
|
||||
$hostname.= ':'.$_SERVER['SERVER_PORT'];
|
||||
}
|
||||
foreach($tabFichier as $fichier) {
|
||||
$retFichier = new ListeFichierSurv();
|
||||
$retFichier->UrlFichier = $hostname.'/fichier/crm/'.$fichier;
|
||||
$result[] = $retFichier;
|
||||
}
|
||||
}
|
||||
$output = new ListeFichierSurvReturn();
|
||||
$output->error = $error;
|
||||
|
@ -4,7 +4,17 @@ require_once __DIR__ . '/Types.php';
|
||||
class Monitoring extends Scores_Ws_Server
|
||||
{
|
||||
|
||||
protected function getSurveillances($source){}
|
||||
protected function getSurveillanceList($source = null)
|
||||
{
|
||||
/**
|
||||
* Afficher les surveillances en groupant par siren
|
||||
* Identite : SIREN, Nom, Adresse
|
||||
* Clic pour liste des éléments
|
||||
* Ligne 1
|
||||
* Ligne 2
|
||||
*
|
||||
*/
|
||||
}
|
||||
protected function getSurveillance(){}
|
||||
protected function getSurveillanceById(){}
|
||||
|
||||
|
@ -3,5 +3,6 @@ return array(
|
||||
'Bilans' => 'Bilans',
|
||||
'Bilan' => 'Bilan',
|
||||
'Actes' => 'Actes',
|
||||
'Acte' => 'Acte',
|
||||
);
|
||||
'Acte' => 'Acte',
|
||||
'AssoActe' => 'AssoActe',
|
||||
);
|
||||
|
@ -554,9 +554,6 @@ class Pieces extends Scores_Ws_Server
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//@todo : Marquer les éléments en commande courrier si déjà commandé ModeDiffusion = O
|
||||
|
||||
}
|
||||
|
||||
$this->wsLog('greffe_actes', $identifiant, 'Liste');
|
||||
@ -885,6 +882,90 @@ class Pieces extends Scores_Ws_Server
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statut association - Liste
|
||||
* @param string $companyId
|
||||
* @param string $type
|
||||
* @return AssoActe[]
|
||||
*/
|
||||
public function getAssoActes($companyId, $type = null)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
// --- Lecture de la table des actes associations
|
||||
$statutM = new Application_Model_JoAssoStatut();
|
||||
$statutSql = $statutM->select()->where('companyId=?', $companyId);
|
||||
$statutResult = $statutM->fetchAll($statutSql);
|
||||
|
||||
$output = array();
|
||||
if (count($statutResult) > 0) {
|
||||
foreach ($statutResult as $item) {
|
||||
$statut = new AssoActe();
|
||||
$statut->Date = $item->statutDate;
|
||||
$statut->File = $item->statutFile;
|
||||
$statut->DateInsert = $item->dateInsert;
|
||||
$output[] = $statut;
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statut association - Fichier
|
||||
* @param string $companyId
|
||||
* Identifiant, siren de l'entreprise
|
||||
* @param string $type
|
||||
* @param string $date
|
||||
* Date au format AAAA-MM-JJ
|
||||
* @throws SoapFault
|
||||
* @return string
|
||||
* URL ou identifiant de commande
|
||||
*/
|
||||
public function getAssoActe($companyId, $type = null, $date)
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('actes');
|
||||
|
||||
// --- Lecture table des actes associations
|
||||
try {
|
||||
$statutM = new Application_Model_JoAssoStatut();
|
||||
$statutSql = $statutM->select()
|
||||
->where('companyId=?', $companyId)
|
||||
->where('statutDate=?', $date);
|
||||
$statutResult = $statutM->fetchRow($statutSql);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient==1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
if ($statutResult === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// --- Distribuer le fichier
|
||||
if ( !empty($statutResult->statutFile) ) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$file = $c->profil->path->secure.'/association/actes/' . $statutResult->statutFile;
|
||||
$dest = $c->profil->path->files . '/' . basename($file);
|
||||
if ( file_exists($file) && copy($file, $dest)) {
|
||||
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
|
||||
if ( $_SERVER['SERVER_PORT'] != '80' ) {
|
||||
$hostname.= ':'.$_SERVER['SERVER_PORT'];
|
||||
}
|
||||
$output = $hostname . '/fichier/greffes/' . basename($dest);
|
||||
$this->wsLog('assoacte', $companyId, basename($dest));
|
||||
return $output;
|
||||
} else {
|
||||
throw new SoapFault('ERR', 'Fichier introuvable.');
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Commande de statut association
|
||||
* @param string $companyId
|
||||
|
@ -162,3 +162,20 @@ class Acte
|
||||
public $infos;
|
||||
}
|
||||
|
||||
class AssoActe
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $Date;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $File;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $DateInsert;
|
||||
}
|
@ -195,5 +195,6 @@ class Source extends Scores_Ws_Server
|
||||
return $id;
|
||||
}
|
||||
|
||||
protected function setContact(){}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -121,8 +121,8 @@ class WDB
|
||||
|
||||
/**
|
||||
* Database delete
|
||||
* @param unknown $table
|
||||
* @param unknown $where
|
||||
* @param string $table
|
||||
* @param string $where
|
||||
* @param string $debug
|
||||
* @param string $low_priority
|
||||
* @return resource
|
||||
@ -133,9 +133,9 @@ class WDB
|
||||
$this->errorMsg = '';
|
||||
|
||||
if ($low_priority)
|
||||
$query='DELETE LOW_PRIORITY QUICK FROM '.$table.' WHERE '.$where.' LIMIT 1;';
|
||||
$query='DELETE LOW_PRIORITY QUICK FROM '.$table.' WHERE '.$where.';';
|
||||
else
|
||||
$query='DELETE FROM '.$table.' WHERE '.$where.' LIMIT 1;';
|
||||
$query='DELETE FROM '.$table.' WHERE '.$where.';';
|
||||
|
||||
if ($debug) $tdeb=microtime_float();
|
||||
|
||||
|
@ -43,7 +43,7 @@ class WDB
|
||||
$values = str_replace("'NULL'", 'NULL', $values);
|
||||
|
||||
if ($low_priority) {
|
||||
$query = 'INSERT DELAYED INTO '.$table.' ('.$fields.') VALUES ('.$values.');';
|
||||
$query = 'INSERT INTO '.$table.' ('.$fields.') VALUES ('.$values.');';
|
||||
} else {
|
||||
$query = 'INSERT INTO '.$table.' ('.$fields.') VALUES ('.$values.');';
|
||||
}
|
||||
@ -83,7 +83,7 @@ class WDB
|
||||
$this->errorMsg = '';
|
||||
|
||||
if ($low_priority) {
|
||||
$query='UPDATE LOW_PRIORITY '.$table.' SET ';
|
||||
$query='UPDATE '.$table.' SET ';
|
||||
} else {
|
||||
$query='UPDATE '.$table.' SET ';
|
||||
}
|
||||
@ -121,8 +121,8 @@ class WDB
|
||||
|
||||
/**
|
||||
* Database delete
|
||||
* @param unknown $table
|
||||
* @param unknown $where
|
||||
* @param string $table
|
||||
* @param string $where
|
||||
* @param string $debug
|
||||
* @param string $low_priority
|
||||
* @return resource
|
||||
@ -133,9 +133,9 @@ class WDB
|
||||
$this->errorMsg = '';
|
||||
|
||||
if ($low_priority)
|
||||
$query='DELETE LOW_PRIORITY QUICK FROM '.$table.' WHERE '.$where.' LIMIT 1;';
|
||||
$query='DELETE QUICK FROM '.$table.' WHERE '.$where.';';
|
||||
else
|
||||
$query='DELETE FROM '.$table.' WHERE '.$where.' LIMIT 1;';
|
||||
$query='DELETE FROM '.$table.' WHERE '.$where.';';
|
||||
|
||||
if ($debug) $tdeb=microtime_float();
|
||||
|
||||
|
@ -20,16 +20,19 @@ define ('ALIGN_RIGHT', 1);
|
||||
*/
|
||||
function initstr($chaine, $taille, $caractere_pour_combler=' ', $align=ALIGN_LEFT)
|
||||
{
|
||||
if (strlen($chaine) >= $taille) {
|
||||
if (mb_strlen($chaine) >= $taille) {
|
||||
return substr($chaine, 0, $taille);
|
||||
}
|
||||
|
||||
$encoding = mb_internal_encoding();
|
||||
$diff = strlen($chaine) - mb_strlen($chaine, $encoding);
|
||||
|
||||
if ($align == ALIGN_RIGHT) {
|
||||
return str_pad($chaine ,$taille, $caractere_pour_combler, STR_PAD_LEFT);
|
||||
}
|
||||
return str_pad($chaine, $taille + $diff, $caractere_pour_combler, STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
if ($align == ALIGN_LEFT) {
|
||||
return str_pad($chaine, $taille, $caractere_pour_combler, STR_PAD_RIGHT);
|
||||
return str_pad($chaine, $taille + $diff, $caractere_pour_combler, STR_PAD_RIGHT);
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
@ -52,32 +52,32 @@
|
||||
* @param mixed Message textuel d'erreur à afficher en cas d'erreur ou false
|
||||
* @return mixed true, false ou Message d'erreur passé en paramètre
|
||||
*/
|
||||
function valideData($variable, $taille_min, $taille_max, $type_variable, $erreur=false){
|
||||
function valideData($variable, $taille_min, $taille_max, $type_variable, $erreur=false) {
|
||||
if ( strlen((string)$variable) < $taille_min )
|
||||
return $erreur;
|
||||
|
||||
if ( strlen((string)$variable) > $taille_max )
|
||||
return $erreur;
|
||||
|
||||
if ( $type_variable == 'A' )
|
||||
if ( is_string($variable) == true )
|
||||
return true;
|
||||
else
|
||||
return $erreur;
|
||||
if ( $type_variable == 'A' )
|
||||
if ( is_string($variable) == true )
|
||||
return true;
|
||||
else
|
||||
return $erreur;
|
||||
|
||||
elseif ( $type_variable == 'N')
|
||||
{
|
||||
for ($i=0; $i < strlen((string)$variable); $i++)
|
||||
{
|
||||
$car = substr((string)$variable,$i,1);
|
||||
if ($car<'0' || $car>'9')
|
||||
return $erreur;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
elseif ( $type_variable == 'N')
|
||||
{
|
||||
for ($i=0; $i < strlen((string)$variable); $i++)
|
||||
{
|
||||
$car = substr((string)$variable,$i,1);
|
||||
if ($car<'0' || $car>'9')
|
||||
return $erreur;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return $erreur;
|
||||
}
|
||||
return $erreur;
|
||||
}
|
||||
|
||||
function adapteOCtets($size) {
|
||||
$kb = 1024; // Kilobyte
|
||||
|
@ -22,11 +22,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../application/autoload_classmap.php',
|
||||
__DIR__ . '/../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
34
scripts/build/classmap.php
Normal file
34
scripts/build/classmap.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
defined('APPLICATION_ENV')
|
||||
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
$dir = array(
|
||||
APPLICATION_PATH,
|
||||
APPLICATION_PATH."/../library/Zend",
|
||||
APPLICATION_PATH."/../library/Application",
|
||||
APPLICATION_PATH."/../library/Scores",
|
||||
APPLICATION_PATH."/../library/SdMetier",
|
||||
);
|
||||
|
||||
$fileClassmap = APPLICATION_PATH."/../library/autoload_classmap.php";
|
||||
|
||||
$i = 0;
|
||||
foreach($dir as $d) {
|
||||
$options = " -a";
|
||||
if ($i==0) {
|
||||
$options = " -w";
|
||||
}
|
||||
passthru("php ".APPLICATION_PATH."/../bin/classmap_generator.php -l ".$d.$options." -o ".$fileClassmap);
|
||||
$i++;
|
||||
}
|
@ -1,14 +1,25 @@
|
||||
CREATE TABLE `utilisateurs_emails` (
|
||||
`id` int(11) NOT NULL,
|
||||
`idClient` int(11) NOT NULL COMMENT 'ID du client',
|
||||
`login` varchar(50) NOT NULL COMMENT 'login de l''utilisateur',
|
||||
`name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Nom à afficher',
|
||||
`email` varchar(255) NOT NULL COMMENT 'email de l''utilisateur',
|
||||
`valid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 si email valide',
|
||||
`validToken` varchar(40) NOT NULL DEFAULT '' COMMENT 'Clé pour la validation par lien de l''email',
|
||||
`dateInsert` datetime NOT NULL,
|
||||
`dateUpdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idClient` (`idClient`),
|
||||
KEY `login` (`login`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
--
|
||||
-- Structure de la table `utilisateurs_emails`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `utilisateurs_emails` (
|
||||
`id` int(11) NOT NULL,
|
||||
`idClient` int(11) NOT NULL COMMENT 'ID du client',
|
||||
`login` varchar(50) NOT NULL COMMENT 'login de l''utilisateur',
|
||||
`emailName` varchar(50) NOT NULL DEFAULT '' COMMENT 'Nom à afficher',
|
||||
`email` varchar(255) NOT NULL COMMENT 'email de l''utilisateur',
|
||||
`account` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Email principal identique compte utilisateur',
|
||||
`pSurveillance` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'email à utiliser pour la prestation surveillance',
|
||||
`valid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 si email validé',
|
||||
`validToken` varchar(40) NOT NULL DEFAULT '' COMMENT 'Clé généré pour la validation par lien de l''email'
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Index pour les tables exportées
|
||||
--
|
||||
|
||||
--
|
||||
-- Index pour la table `utilisateurs_emails`
|
||||
--
|
||||
ALTER TABLE `utilisateurs_emails`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
@ -20,11 +20,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,11 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,11 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
@ -120,7 +116,7 @@ if ( isset($opts->comments) ) {
|
||||
if (isset($opts->niveau)) {
|
||||
$cycle = $opts->niveau;
|
||||
}
|
||||
|
||||
|
||||
if (generateComment($opts->comments, $type, $cycle) === true){
|
||||
echo "Code généré. \n";
|
||||
}
|
||||
@ -404,16 +400,16 @@ function genereCacheRatios()
|
||||
$iDb = new WDB();
|
||||
|
||||
$configFile = APPLICATION_PATH.'/../library/Metier/scores/classMRatios.php';
|
||||
|
||||
|
||||
$fp=fopen($configFile, 'w');
|
||||
fwrite($fp, '<?php'."\n");
|
||||
fwrite($fp, "/** Auto generated class ".date('Y-m-d H:i:s')."*/" . "\n");
|
||||
fwrite($fp, "class MRatios
|
||||
{
|
||||
public \$tva = 20.0;
|
||||
|
||||
|
||||
public \$efftr = null;
|
||||
|
||||
|
||||
/**
|
||||
* Donne le taux d'inflation pour une année donnée
|
||||
* @param unknown \$annee
|
||||
@ -426,7 +422,7 @@ function genereCacheRatios()
|
||||
return \$tabInfla[\$annee];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Donne le taux de rendement des actions pour une année donnée
|
||||
* @param unknown \$annee
|
||||
@ -439,7 +435,7 @@ function genereCacheRatios()
|
||||
return \$tabTxRendObli[\$annee];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Définit la tranche d'effectif
|
||||
* @param int \$value
|
||||
@ -448,7 +444,7 @@ function genereCacheRatios()
|
||||
{
|
||||
\$this->efftr = \$value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calcul les ratios
|
||||
* @param array \$bilans
|
||||
@ -461,14 +457,14 @@ function genereCacheRatios()
|
||||
{
|
||||
\$numBil = 0;
|
||||
foreach (\$bilans as \$k => \$p) {
|
||||
|
||||
|
||||
\$millesime = \$p['CONSOLIDE'];
|
||||
|
||||
|
||||
// --- Utilisation des bilans N ou S uniquement
|
||||
if ( !in_array(substr(\$millesime, 0, 1), array('S', 'N')) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// --- Calcul
|
||||
" . "\n");
|
||||
|
||||
|
@ -18,11 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,11 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -19,14 +19,10 @@ set_include_path(implode(PATH_SEPARATOR, array(
|
||||
require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
|
||||
|
||||
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/SdMetier/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
@ -56,47 +52,47 @@ try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
//Options
|
||||
array(
|
||||
|
||||
|
||||
'help|?' => "Aide.",
|
||||
'fichier=s' => "Nom du fichier complet : version ",
|
||||
'affiche=s' => "Affiche resultat traitement "
|
||||
));
|
||||
$opts->parse();
|
||||
}
|
||||
|
||||
|
||||
catch (Zend_Console_Getopt_Exception $e)
|
||||
{
|
||||
echo $opts->getUsageMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//Usage
|
||||
if( count($opts->getOptions())==0 || isset($opts->help))
|
||||
{
|
||||
echo $opts->getUsageMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
#########################################################
|
||||
##### Presence te taille du fichier #####
|
||||
#########################################################
|
||||
|
||||
|
||||
$fichier = $opts->fichier; // $fichier contient chemin/qqchose.csv
|
||||
$nomfichier = basename($fichier); // $nomfichier contient qqchose.csv, basename retourne un array donc un tableau ayant comme valeur chacun des
|
||||
|
||||
|
||||
// fichiers (chemain absolu) contenu dans le repertoir $directory, ici le repertoir contient normalement une seul fichier a la fois , donc $fichier[]
|
||||
$fic = $fichier ; // On definti notre variable $fic comme etant notre fichier.
|
||||
|
||||
#########################################################
|
||||
##### Teste de validité du nom du fichier #####
|
||||
#########################################################
|
||||
|
||||
|
||||
$detect1 = strstr($nomfichier, 'valo_commentaires_');
|
||||
$detect2 = strstr($nomfichier, 'valo_formules_');
|
||||
$detect3 = strstr($nomfichier, 'scores_formules_');
|
||||
$detect4 = strstr($nomfichier, 'scores_commentaires_');
|
||||
|
||||
|
||||
|
||||
|
||||
if ($detect1 !== false or $detect2 !== false or $detect3 !== false or $detect4 !== false)
|
||||
{
|
||||
echo "\n"." Nom du fichier ok"."\n" ;
|
||||
@ -112,15 +108,15 @@ try {
|
||||
echo "\n" . 'scores_formules_' . "\n";
|
||||
echo "\n" ."ou"."\n";
|
||||
echo "\n" . 'scores_commentaires_' . "\n";
|
||||
|
||||
|
||||
Exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################
|
||||
##### On indique si le fichier est present ou non #####
|
||||
#########################################################
|
||||
|
||||
|
||||
if ((file_exists($fichier)))
|
||||
{
|
||||
echo "\n Fichier $nomfichier au format csv trouve a l'emplacement prevu : \n";
|
||||
@ -133,43 +129,43 @@ try {
|
||||
$file = false;
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
#########################################################
|
||||
##### taille du contenu du fichier #####
|
||||
#########################################################
|
||||
|
||||
|
||||
# déclaration variables :
|
||||
|
||||
|
||||
$fileopen = fopen($fic, 'r');
|
||||
$contenufichier = fgetcsv($fileopen);
|
||||
$nblignes=0;
|
||||
$cnbl = count($nblignes);
|
||||
$fific = file($fic); // retourner le contenu du fichier dans une chaîne de caractères.
|
||||
|
||||
|
||||
|
||||
|
||||
foreach ($fific as $line_num => $line)
|
||||
{
|
||||
$nblignes++;
|
||||
}
|
||||
echo "\n"." le fichier contient " . $nblignes . " lignes."."\n" ;
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################
|
||||
##### Routage vers commentaires ou formules #####
|
||||
#########################################################
|
||||
|
||||
|
||||
#variables :
|
||||
|
||||
|
||||
$doublon = 0; // On initialise la variable doublon.
|
||||
$row = 0 ; // On initialise les lignes.
|
||||
$verif = array() ; // creation d'un tableau
|
||||
$nom_fic = basename($fic) ;
|
||||
$col3= 0;
|
||||
|
||||
$col3= 0;
|
||||
|
||||
#########################################################
|
||||
##### Identification du type de fichier #####
|
||||
#########################################################
|
||||
|
||||
|
||||
//On commance rechercher si le nom du fichier contient "COMMENTAIRE" pour 4 colonnes sinon 2 colonnes
|
||||
if (strstr($nom_fic, 'commentaires'))
|
||||
{
|
||||
@ -179,26 +175,26 @@ try {
|
||||
{
|
||||
$nbcol_cle = 2;
|
||||
}
|
||||
|
||||
|
||||
// Si $fic est bien ouvert on commence le traitement.
|
||||
if ($file = true )
|
||||
{
|
||||
$fileopen2 = fopen($fic, "r+");
|
||||
|
||||
|
||||
if($fileopen2)
|
||||
{
|
||||
$contenufichier=fgetcsv($fileopen2);
|
||||
$nblignes = file($fic);
|
||||
|
||||
|
||||
// Tant qu'il y a des lignes, lis les et fait en un tableau.
|
||||
while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE)
|
||||
{
|
||||
$num = count($row); //compte nombre de partits dans la phrase
|
||||
$row++;
|
||||
|
||||
|
||||
// On fait une concatenation des colonnes de $fic dans un nouveau tableau nomme $cle.
|
||||
// Cela nous permettera de dedoublonner par la suite.
|
||||
|
||||
|
||||
if ($nbcol_cle == 4) // si nbcol = 4 alors notre clé sera composée de 4 colonnes sinon 3
|
||||
{
|
||||
$cle = $data[0].$data[1].$data[2].$data[3];
|
||||
@ -207,11 +203,11 @@ try {
|
||||
{
|
||||
$cle = $data[0].$data[1].$data[2];
|
||||
}
|
||||
|
||||
|
||||
#########################################################
|
||||
##### Dédoublonnage #####
|
||||
#########################################################
|
||||
|
||||
|
||||
// On regarde si on retrouve les valeurs de $verif dans $cle
|
||||
if (in_array($cle, $verif, TRUE))
|
||||
{
|
||||
@ -236,13 +232,13 @@ try {
|
||||
{
|
||||
echo "\n"."Erreur ! Vous avez des champs vides commentaires , sur la ligne $num"."\n"."contenant $data[1].$data[2].$data[3].$data[4].$data[5].$data[6].$data[7]";
|
||||
}
|
||||
|
||||
|
||||
if ($data[0] == 0)
|
||||
{
|
||||
echo "\n"."erreur code commentaire ". $data[0] ." null"."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if($data[2] < 0)
|
||||
{
|
||||
echo "\n"."erreur code ligne " . $data[2] . "null"."\n";
|
||||
@ -250,26 +246,26 @@ try {
|
||||
}
|
||||
}
|
||||
elseif (strstr ($nom_fic , 'formules'))
|
||||
{
|
||||
{
|
||||
if (strlen($data[0]) == 0 or strlen($data[1]) == 0 )
|
||||
{
|
||||
echo "\n"." Erreur vous avez des champs vides formules , sur la ligne $row"."\n"."contenant $data[0].$data[1]. . ";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if ($data[0] == 0)
|
||||
{
|
||||
echo "\n"."erreur code commentaire " . $data[0] . " null"."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if($data[1] < 0)
|
||||
{
|
||||
echo "\n"."erreur code code ligne". $data[1] ."null"."\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($doublon >= 1)
|
||||
@ -278,7 +274,7 @@ try {
|
||||
echo "\n"." $doublon Doublons détectés dans le fichier."."\n";
|
||||
// Quitte avec un code d'erreur: doublon détecté.
|
||||
exit(1);
|
||||
|
||||
|
||||
}
|
||||
elseif ($doublon == 0 && !file_exists($fic))
|
||||
{
|
||||
@ -287,26 +283,26 @@ try {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
// le script appelant continue.
|
||||
$ok = true; // petit marqueur de fonctionnement du script jusqu'a présent
|
||||
$ok = true; // petit marqueur de fonctionnement du script jusqu'a présent
|
||||
echo "\n Le fichier ne comporte pas de doublon. \n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fclose($fileopen);
|
||||
|
||||
|
||||
echo "\n Bon, maintenant on va passer a la base de donnee \n";
|
||||
|
||||
|
||||
|
||||
echo "\n Bon, maintenant on va passer a la base de donnee \n";
|
||||
|
||||
#########################################################
|
||||
##### ________ ____ ____ #####
|
||||
### | __ \ | \ | \ ###
|
||||
# | / | |\ \ | |\ \ #
|
||||
# | / | |\ \ | |\ \ #
|
||||
### | __ \ | |/ / | |/ / ###
|
||||
##### |_______/ |___/ |___/ #####
|
||||
#########################################################
|
||||
|
||||
// si notre scripte est bon on passe a la suite
|
||||
|
||||
// si notre scripte est bon on passe a la suite
|
||||
$c = new Zend_Config($application->getOptions());
|
||||
try {
|
||||
$db = Zend_Db::factory($c->profil->db->metier);
|
||||
@ -315,25 +311,25 @@ try {
|
||||
}
|
||||
catch (Zend_Exception $e)
|
||||
{
|
||||
echo $e->getMessage();
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
|
||||
if ($db->isConnected())
|
||||
{
|
||||
echo "\n***********************************************\n";
|
||||
echo "\n Connection a la BDD ok \n";
|
||||
echo "\n***********************************************\n";
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
echo "\n***********************************************\n";
|
||||
echo "\n !!!! Erreur / ! Pas connecte a la BDD !!!! \n";
|
||||
echo "\n !!!! Erreur / ! Pas connecte a la BDD !!!! \n";
|
||||
echo "\n***********************************************\n";
|
||||
}
|
||||
|
||||
$pathCache = APPLICATION_PATH . '/../library/Metier/scores/Variables';
|
||||
$copy_fic = $nomfichier;
|
||||
|
||||
|
||||
if($nomfichier) // Si le nom du fichier comprend 'scores' ou 'valo'...
|
||||
{
|
||||
// On découpe la chaine de caractère à chaque "/" et on fait un array.
|
||||
@ -341,24 +337,24 @@ else
|
||||
|
||||
// On prend ce qui se trouve avant le point
|
||||
$token1 = strtok($token, ".");
|
||||
|
||||
|
||||
// On effece '_utf8' et '.csv'
|
||||
$nomtabletemp =(str_replace('_utf8', '', $token));
|
||||
$nomtable =(str_replace('.csv','', $nomtabletemp));
|
||||
|
||||
|
||||
// Affichage du nom de la table
|
||||
echo "\n Le nom de la table est : $nomtable . \n";
|
||||
}
|
||||
|
||||
|
||||
####################################################
|
||||
##### // Création de la Table Ccmmentaires \\ #####
|
||||
####################################################
|
||||
|
||||
|
||||
if (strstr($nomtable,"commentaires"))
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
{
|
||||
// Création d'une table "TEXTE"
|
||||
$sql_ctc_query = $db->query("CREATE TABLE $nomtable
|
||||
(
|
||||
@ -380,16 +376,16 @@ else
|
||||
{
|
||||
echo $e->getMessage()."\n";
|
||||
echo "\n"."!!!!! ERREUR ! / CHARGEMENT ARRETE !!!!!"."\n"."\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
echo "\n" . " Table $nomtable cree." ."\n";
|
||||
}
|
||||
|
||||
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
$fileopen2 = fopen($fic, "r+");
|
||||
$nbr=0;
|
||||
|
||||
|
||||
if($fileopen2)
|
||||
{
|
||||
$contenufichier=fgetcsv($fileopen2);
|
||||
@ -398,22 +394,22 @@ else
|
||||
$null = null;
|
||||
$zero = 0;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
exit;
|
||||
echo "\n"."Erreur a l'ouverture du fichier"."\n";
|
||||
echo "\n"."Erreur a l'ouverture du fichier"."\n";
|
||||
}
|
||||
|
||||
|
||||
if(strstr($nomtable,"commentaires"))
|
||||
{
|
||||
// Tant qu'il y a des lignes, lis les et fait en un tableau.
|
||||
while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE)
|
||||
{
|
||||
|
||||
|
||||
####################################################
|
||||
##### encodage et remplacement du contenu #####
|
||||
####################################################
|
||||
|
||||
|
||||
$data[4] = str_replace(chr(93), "]", $data[4]); // crochet fermant
|
||||
$data[4] = str_replace(chr(92), "\\" , $data[4]); // anti slash
|
||||
$data[4] = str_replace(chr(128), '€', $data[4]); // devise euros
|
||||
@ -425,8 +421,8 @@ else
|
||||
$data[4] = str_replace(chr(147), '"', $data[4]); // left double quote
|
||||
$data[4] = str_replace(chr(148), '"', $data[4]); // right double quote
|
||||
$data[4] = str_replace(chr(150), '–', $data[4]); // tiret du 6
|
||||
|
||||
|
||||
|
||||
|
||||
$data[5] = str_replace(chr(93), "]", $data[5]); // crochet fermant
|
||||
$data[5] = str_replace(chr(92), "\\" , $data[5]); // anti slash
|
||||
$data[5] = str_replace(chr(128), '€', $data[5]); // devise euros
|
||||
@ -438,25 +434,25 @@ else
|
||||
$data[5] = str_replace(chr(147), '"', $data[5]); // left double quote
|
||||
$data[5] = str_replace(chr(148), '"', $data[5]); // right double quote
|
||||
$data[5] = str_replace(chr(150), '–', $data[5]); // tiret du 6
|
||||
|
||||
|
||||
$encode = mb_detect_encoding($data[4]); // detection de l'encodage.
|
||||
$encode = mb_detect_encoding($data[5]); // detection de l'encodage.
|
||||
$data[4] = mb_convert_encoding($data[4], $encode, 'UTF-8');
|
||||
$data[5] = mb_convert_encoding($data[5], $encode, 'UTF-8');
|
||||
|
||||
|
||||
// $Zdata4 = '"'.$db->->real_escape_string($data[4]);
|
||||
// $Zdata4 = $db->quote($data[4]);
|
||||
|
||||
|
||||
//$Zdata4 = mysqli_real_escape_string($db, $data[4]);
|
||||
|
||||
|
||||
if ($data[5] == null)
|
||||
{
|
||||
$data[5] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$zdata4= $db->quote($data[4]);
|
||||
$nbr++;
|
||||
|
||||
|
||||
// ESSAI 1
|
||||
$sql_insert = array
|
||||
(
|
||||
@ -471,13 +467,13 @@ else
|
||||
'dateInsert' => "$null",
|
||||
'dateUpdate' => "$null"
|
||||
);
|
||||
|
||||
try
|
||||
|
||||
try
|
||||
{
|
||||
# $num = count($row); // On compte nombre de parti dans la phrase
|
||||
# $row++; // à chaques tour de boucle j'ajoute 1 à $row
|
||||
|
||||
|
||||
|
||||
|
||||
// ESSAI 2
|
||||
/*
|
||||
$sql_itc = $db->query("INSERT INTO $nomtable
|
||||
@ -488,37 +484,37 @@ else
|
||||
".$data[0].",".$data[1].",".$data[2].",".$data[3].",".$Zdata4.",".$data[5].",'','','',)
|
||||
");
|
||||
*/
|
||||
|
||||
$db->insert($nomtable, $sql_insert);
|
||||
|
||||
|
||||
$db->insert($nomtable, $sql_insert);
|
||||
|
||||
//`
|
||||
// Astuce !! La structure de $data[0] étant un int on retire les "
|
||||
// Astuce !! La colonne 5 contenant des apostrophs étant interprété par le sql comme un nouveau champ il est necessaire de protéger ce champs, du coup in ajoute la fonction mysql_real_escape_string() pour insérer un antislash devant les caractères " NULL, \x00, \n, \r, \, ', " et \x1a. "
|
||||
}
|
||||
|
||||
|
||||
// Renseignement sur les erreurs possibles
|
||||
#echo ("$sql_itt");
|
||||
catch(Zend_Exception $e)
|
||||
{
|
||||
echo "\n" . $e->getMessage()."\n";
|
||||
|
||||
|
||||
//echo "\n"."!!!!!!!!!!!!!!!!!!!!! Import de la table $nomtable echouee. !!!!!!!!!!!!!!!!!!!!!"."\n"."\n";
|
||||
//$sql_erase = $db->query("DROP TABLE $nomtable;");
|
||||
//echo "La table $nomtable a ete effacee !! \n ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "\n"."Import de la table $nomtable . ok". "\n";
|
||||
|
||||
|
||||
// comptage sql
|
||||
$comptage = count($sql_itc_query);
|
||||
echo "\n"."Nombre de lignes importees : "."$nbr"."\n";
|
||||
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
elseif(strstr($nomtable,"formules"))
|
||||
{
|
||||
####################################################
|
||||
@ -542,7 +538,7 @@ else
|
||||
PRIMARY KEY (code,ligne)
|
||||
)
|
||||
ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Criteres Valorisation - Formules de calculs' ;");
|
||||
|
||||
|
||||
}
|
||||
catch (Zend_Exception $e)
|
||||
{
|
||||
@ -551,16 +547,16 @@ else
|
||||
}
|
||||
echo "\n Table $nomtable cree.\n";
|
||||
|
||||
|
||||
|
||||
// Tant qu'il y a des lignes, lis les et fait en un tableau.
|
||||
while (($data = fgetcsv($fileopen2,0,';','"')) !== FALSE)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################
|
||||
##### encodage et remplacement du contenu #####
|
||||
####################################################
|
||||
|
||||
|
||||
$data[2] = str_replace(chr(93), "]", $data[2]); // crochet fermant
|
||||
$data[2] = str_replace(chr(92), "\\" , $data[2]); // anti slash
|
||||
$data[2] = str_replace(chr(128), '€', $data[2]); // devise euros
|
||||
@ -572,8 +568,8 @@ else
|
||||
$data[2] = str_replace(chr(147), '"', $data[2]); // left double quote
|
||||
$data[2] = str_replace(chr(148), '"', $data[2]); // right double quote
|
||||
$data[2] = str_replace(chr(150), '–', $data[2]); // tiret du 6
|
||||
|
||||
|
||||
|
||||
|
||||
$data[4] = str_replace(chr(93), "]", $data[4]); // crochet fermant
|
||||
$data[4] = str_replace(chr(92), "\\" , $data[4]); // anti slash
|
||||
$data[4] = str_replace(chr(128), '€', $data[4]); // devise euros
|
||||
@ -585,8 +581,8 @@ else
|
||||
$data[4] = str_replace(chr(147), '"', $data[4]); // left double quote
|
||||
$data[4] = str_replace(chr(148), '"', $data[4]); // right double quote
|
||||
$data[4] = str_replace(chr(150), '–', $data[4]); // tiret du 6
|
||||
|
||||
|
||||
|
||||
|
||||
$data[5] = str_replace(chr(93), "]", $data[5]); // crochet fermant
|
||||
$data[5] = str_replace(chr(92), "\\" , $data[5]); // anti slash
|
||||
$data[5] = str_replace(chr(128), '€', $data[5]); // devise euros
|
||||
@ -598,7 +594,7 @@ else
|
||||
$data[5] = str_replace(chr(147), '"', $data[5]); // left double quote
|
||||
$data[5] = str_replace(chr(148), '"', $data[5]); // right double quote
|
||||
$data[5] = str_replace(chr(150), '–', $data[5]); // tiret du 6
|
||||
|
||||
|
||||
$data[6] = str_replace(chr(93), "]", $data[6]); // crochet fermant
|
||||
$data[6] = str_replace(chr(92), "\\" , $data[6]); // anti slash
|
||||
$data[6] = str_replace(chr(128), '€', $data[6]); // devise euros
|
||||
@ -610,19 +606,19 @@ else
|
||||
$data[6] = str_replace(chr(147), '"', $data[6]); // left double quote
|
||||
$data[6] = str_replace(chr(148), '"', $data[6]); // right double quote
|
||||
$data[6] = str_replace(chr(150), '–', $data[6]); // tiret du 6
|
||||
|
||||
|
||||
$encode = mb_detect_encoding($data[2]); // detection de l'encodage.
|
||||
$encode = mb_detect_encoding($data[5]); // detection de l'encodage.
|
||||
$encode = mb_detect_encoding($data[4]); // detection de l'encodage.
|
||||
$encode = mb_detect_encoding($data[6]); // detection de l'encodage.
|
||||
|
||||
|
||||
$data[2] = mb_convert_encoding($data[2], $encode, 'UTF-8');
|
||||
$data[4] = mb_convert_encoding($data[4], $encode, 'UTF-8');
|
||||
$data[5] = mb_convert_encoding($data[5], $encode, 'UTF-8');
|
||||
$data[6] = mb_convert_encoding($data[6], $encode, 'UTF-8');
|
||||
|
||||
|
||||
$sql_insert = array(
|
||||
|
||||
|
||||
$sql_insert = array(
|
||||
'code' => "$data[0]",
|
||||
'ligne' => "$data[1]",
|
||||
'remarque' => "$data[2]",
|
||||
@ -632,12 +628,12 @@ $sql_insert = array(
|
||||
'valeur' => "$data[6]",
|
||||
'tri' => "$null",
|
||||
'deleted' => "$null",
|
||||
'idUser' => "$null",
|
||||
'dateInsert' => "$null",
|
||||
'idUser' => "$null",
|
||||
'dateInsert' => "$null",
|
||||
'dateUpdate' => "$null"
|
||||
);
|
||||
$nbr++;
|
||||
try{
|
||||
try{
|
||||
$db->insert($nomtable, $sql_insert);
|
||||
}
|
||||
catch (Zend_Exception $e)
|
||||
@ -646,27 +642,27 @@ $sql_insert = array(
|
||||
echo "\n"."!!!!! ERREUR ! / CHARGEMENT ARRETE !!!!!"."\n"."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "\n"." Import de la table $nomtable ok."."\n";
|
||||
|
||||
|
||||
// comptage sql
|
||||
$comptage = count($sql_insert);
|
||||
echo "\n"." Nombre de lignes importees : "."$nbr"."\n";
|
||||
fclose($fileopen2);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Exécution de la requête
|
||||
//$result = $db->query($sql_ctt);
|
||||
// Renseignement sur les erreurs possibles
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// echo "<strong>" . $Erreur . "</strong> <br /> <br />\n";
|
||||
//
|
||||
//
|
||||
// if ($sql_ctt_query) // si code retour OK
|
||||
// {
|
||||
// echo "Création de la table $nomtable ok.<br />";
|
||||
|
@ -45,7 +45,7 @@ profil.sphinx.histo.version = 2
|
||||
|
||||
; For old configuration - see Configure.php
|
||||
profil.db.metier.adapter=mysqli
|
||||
profil.db.metier.params.host=192.168.78.230
|
||||
profil.db.metier.params.host=192.168.78.249
|
||||
profil.db.metier.params.username=wsuser
|
||||
profil.db.metier.params.password=scores
|
||||
profil.db.metier.params.dbname=sdv1
|
||||
|
@ -17,10 +17,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,10 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,10 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,10 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
@ -106,7 +103,7 @@ function sendMail($commande, $type){
|
||||
switch ( $type ) {
|
||||
case 'BI':
|
||||
$dateBilan = substr($commande->bilanCloture,8,2).'/'.substr($commande->bilanCloture,5,2).'/'.substr($commande->bilanCloture,0,4);
|
||||
$message.= "Bilan cloturé le ";
|
||||
$message.= "Bilan cloturé le ".$dateBilan;
|
||||
break;
|
||||
case 'AC':
|
||||
$dateActe = substr($commande->acteDate,8,2).'/'.substr($commande->acteDate,5,2).'/'.substr($commande->acteDate,0,4);
|
||||
@ -426,7 +423,7 @@ foreach ( $tabCommandes as $ref => $commande ) {
|
||||
$sql->where('type_comptes="consolides"');
|
||||
}
|
||||
$item = $bilanM->fetchRow($sql);
|
||||
|
||||
|
||||
// --- Enregistrement
|
||||
if ( $isFileOnStorage && $item->pdfDate == '0000-00-00' ) {
|
||||
$infos = $infogreffe->pdfInfos($fileOut);
|
||||
|
@ -18,10 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
415
scripts/jobs/getKbis2.php
Normal file
415
scripts/jobs/getKbis2.php
Normal file
@ -0,0 +1,415 @@
|
||||
<?php
|
||||
/**
|
||||
* User-Agent
|
||||
* IE 11.0 : Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
// Define path to application directory
|
||||
defined('APPLICATION_PATH')
|
||||
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
||||
|
||||
// Define application environment
|
||||
define('APPLICATION_ENV', 'development');
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, array(
|
||||
realpath(APPLICATION_PATH . '/../library'),
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
//Use classmap autoloader - useful with opcode and realpath cache
|
||||
require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
'Zend' => __DIR__ . '/../../library/Zend',
|
||||
'Application' => __DIR__ . '/../../library/Application',
|
||||
'Scores' => __DIR__ . '/../../library/Scores',
|
||||
'SdMetier' => __DIR__ . '/../../library/SdMetier',
|
||||
'Metier' => __DIR__ . '/../../library/Metier',
|
||||
),
|
||||
'fallback_autoloader' => true
|
||||
)
|
||||
));
|
||||
|
||||
// Zend_Application - Use it if you don't have autoloaders
|
||||
//require_once 'Zend/Application.php';
|
||||
|
||||
// Create application, bootstrap, and run
|
||||
$application = new Zend_Application(
|
||||
APPLICATION_ENV,
|
||||
APPLICATION_PATH . '/configs/application.ini'
|
||||
);
|
||||
|
||||
try {
|
||||
$opts = new Zend_Console_Getopt(
|
||||
//Options
|
||||
array(
|
||||
'help|?' => "Affiche l'aide.",
|
||||
'siren=s' => "Commander un kbis",
|
||||
'commandes' => "Liste les commandes passees (Reference), si reference alors recupere le kbis",
|
||||
'visu=s' => "Telechargement du kbis avec une reference (--commandes obligatoire)",
|
||||
'debug' => "Mode debug",
|
||||
)
|
||||
);
|
||||
$opts->parse();
|
||||
} catch (Zend_Console_Getopt_Exception $e) {
|
||||
echo $e->getUsageMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
$c = new Zend_Config($application->getOptions());
|
||||
Zend_Registry::set('config', $c);
|
||||
|
||||
if ( isset($opts->debug) ) {
|
||||
define('DEBUG', true);
|
||||
} else {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
//Usage
|
||||
if(count($opts->getOptions())==0 || isset($opts->help))
|
||||
{
|
||||
echo "Telecharge le kbis chez infogreffe.";
|
||||
echo "\n\n";
|
||||
echo $opts->getUsageMessage();
|
||||
echo "\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
338 437 189
|
||||
552 144 503
|
||||
|
||||
https://www.infogreffe.fr/societes/
|
||||
|
||||
Se connecter
|
||||
Form
|
||||
Var client : 0041
|
||||
Var utilisateur : 2559
|
||||
Var password : 69873
|
||||
|
||||
|
||||
1 - GET https://www.infogreffe.fr/societes/
|
||||
|
||||
2 - POST https://www.infogreffe.fr/sso/identity/authenticate
|
||||
password 69873
|
||||
uri realm=abonnes
|
||||
username 00412559
|
||||
token.id=AQIC5wM2LY4Sfcy_Nc7YNNc2BtJVjZr-CrTMfnMxDw1iSvw.*AAJTSQACMDIAAlMxAAIwNA..*
|
||||
|
||||
3 - GET https://www.infogreffe.fr/societes/
|
||||
|
||||
|
||||
|
||||
4 - GET https://www.infogreffe.fr/services/entreprise/rest/recherche/parPhrase?nbIdRetournes=100&surveillanceVisible=true&miseAuPanierVisible=true&typeProduitMisEnAvant=EXTRAIT&phrase=338437189
|
||||
miseAuPanierVisible true
|
||||
nbIdRetournes 100
|
||||
phrase 338437189
|
||||
surveillanceVisible true
|
||||
typeProduitMisEnAvant EXTRAIT
|
||||
|
||||
{"critereRecherchePrincipal":"338437189","critereRecherche":null,"entrepRechInfosComplementaires":null
|
||||
,"entrepRCSStoreResponse":{"success":true,"identifier":"id","label":"deno","loadedAttr":"numeroDossier"
|
||||
,"idRecherche":"ENTREP_RCS_ACTIF","nbTotalResultats":1,"items":[{"id":8143039,"numeroDossier":"130586B20094"
|
||||
,"etablissementChrono":"0000","libelleEntreprise":{"denomination":"PROVENCE PLOMBERIE","denominationEirl"
|
||||
:null,"enseigne":"PROVENCE PLOMBERIE","nomCommercial":null,"sigle":null},"siren":338437189,"nic":"00016"
|
||||
,"adresse":{"lignes":["QUARTIER LA MARIANNE "],"codePostal":"13560","bureauDistributeur":"SÉNAS"},"codePaysRegistreEtranger"
|
||||
:null,"greffe":{"numero":"1305","nom":"TARASCON","codeGroupement":"05","codeEDI":"G1305","nomGreffeMin"
|
||||
:null},"typeEtab":"SIE","produitAuPanier":"AJOUTABLE","typeInscription":1,"sourceDonnees":"GTC","radie"
|
||||
:false,"dateRadiation":null,"nbEtablissements":1,"activite":{"codeNAF":"4322A","libelleNAF":"Travaux
|
||||
d'installation d'eau et de gaz en tous locaux"},"etatSurveillance":"SURVEILLABLE"}],"typeProduitMisEnAvant"
|
||||
:"EXTRAIT","critereRecherchePrincipal":null,"entrepRechInfosComplementaires":null},"entrepMultiStoreResponse"
|
||||
:{"success":true,"identifier":"id","label":"deno","loadedAttr":"numeroDossier","idRecherche":null,"nbTotalResultats"
|
||||
:0,"items":null,"typeProduitMisEnAvant":"EXTRAIT","critereRecherchePrincipal":null,"entrepRechInfosComplementaires"
|
||||
:null},"entrepRadieeStoreResponse":null,"entrepHorsRCSStoreResponse":{"success":true,"identifier":"id"
|
||||
,"label":"deno","loadedAttr":"numeroDossier","idRecherche":"ENTREP_HORS_RCS_ACTIFS","nbTotalResultats"
|
||||
:0,"items":[],"typeProduitMisEnAvant":"EXTRAIT","critereRecherchePrincipal":null,"entrepRechInfosComplementaires"
|
||||
:null},"reprStoreResponse":{"success":true,"identifier":"id","label":"deno","loadedAttr":"numeroDossier"
|
||||
,"idRecherche":"REPRESENTANT","nbTotalResultats":0,"items":[],"typeProduitMisEnAvant":"EXTRAIT","critereRecherchePrincipal"
|
||||
:"338437189","critereRecherche":null,"entrepRechInfosComplementaires":null},"typeProduitMisEnAvant":"EXTRAIT"
|
||||
}
|
||||
|
||||
5 - GET https://www.infogreffe.fr/societes/entreprise-societe/338437189-provence-plomberie-130586B200940000.html?typeProduitOnglet=EXTRAIT&afficherretour=false
|
||||
afficherretour false
|
||||
typeProduitOnglet EXTRAIT
|
||||
|
||||
<title>PROVENCE PLOMBERIE à SÉNAS (338437189) - Infogreffe</title>
|
||||
|
||||
5 - GET https://www.infogreffe.fr/services/produits/rest/catalogue/dossier/130586B20094/0000
|
||||
|
||||
{"ordrePresentationParProduit":{"BILAN_SAISI":6,"EXTRAIT":1,"ETAT_ENDETEMENT":2,"DOSSIER_COMPLET":9,"HISTO_MODIFS_RCS"
|
||||
:7,"CERTIF_PROC_COLLECTIVE":8,"ACTE":5},"cataloguePrix":{"ETAT_ENDETEMENT":{"typeProduit":"ETAT_ENDETEMENT"
|
||||
,"prixBaseTTC":46.8,"prixFraisEnvoiPostalTTC":1.42,"prixFraisEnvoiElectroniqueTTC":2.34,"prixBaseTTCParTypeInscription"
|
||||
:3.12,"prixFraisEnvoiPostalTTCParTypeInscription":0.89},"BILAN_SAISI":{"typeProduit":"BILAN_SAISI","prixBaseTTC"
|
||||
:3.6,"prixFraisEnvoiPostalTTC":0.0,"prixFraisEnvoiElectroniqueTTC":2.34},"STATUT_A_JOUR":{"typeProduit"
|
||||
:"STATUT_A_JOUR","prixBaseTTC":9.36,"prixFraisEnvoiPostalTTC":2.15,"prixFraisEnvoiElectroniqueTTC":2
|
||||
.34},"HISTO_MODIFS_RCS":{"typeProduit":"HISTO_MODIFS_RCS","prixBaseTTC":7.8,"prixFraisEnvoiPostalTTC"
|
||||
:0.0,"prixFraisEnvoiElectroniqueTTC":2.34},"BILAN_COMPLET":{"typeProduit":"BILAN_COMPLET","prixBaseTTC"
|
||||
:9.36,"prixFraisEnvoiPostalTTC":2.15,"prixFraisEnvoiElectroniqueTTC":2.34},"EXTRAIT":{"typeProduit":"EXTRAIT"
|
||||
,"prixBaseTTC":3.12,"prixFraisEnvoiPostalTTC":0.89,"prixFraisEnvoiElectroniqueTTC":0.78},"DOSSIER_COMPLET"
|
||||
:{"typeProduit":"DOSSIER_COMPLET","prixBaseTTC":70.19999999999999,"prixFraisEnvoiPostalTTC":7.499999999999999
|
||||
,"prixFraisEnvoiElectroniqueTTC":2.34},"ACTE":{"typeProduit":"ACTE","prixBaseTTC":9.36,"prixFraisEnvoiPostalTTC"
|
||||
:2.15,"prixFraisEnvoiElectroniqueTTC":2.34},"CERTIF_PROC_COLLECTIVE":{"typeProduit":"CERTIF_PROC_COLLECTIVE"
|
||||
,"prixBaseTTC":1.56,"prixFraisEnvoiPostalTTC":0.89,"prixFraisEnvoiElectroniqueTTC":2.34}},"produits"
|
||||
:[{"modesDeDiffusionDispos":["V","C","M","T"],"produit":{"typeProduit":"EXTRAIT","modifiable":true,"identifiant"
|
||||
:{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"},"kbisPeriodique"
|
||||
:true},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C"],"produit":{"typeProduit":"ETAT_ENDETEMENT"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094"},"categoriesInscription":[{"code":"C1","libelle":"Catégorie 1","typesInscription":[{"code":"PRIV_SECU"
|
||||
,"libelle":"Privilège de la sécurité sociale et des régimes complémentaires"},{"code":"PRIV_TRESOR","libelle"
|
||||
:"Privilège du Trésor Public"},{"code":"PROTET","libelle":"Protêts"},{"code":"PRIV_ANAEM","libelle":"Agence
|
||||
Nationale de l'Accueil des Etrangers et des Migrations"}]},{"code":"C2","libelle":"Catégorie 2","typesInscription"
|
||||
:[{"code":"NAN_FOND_COMM","libelle":"Nantissements du fonds de commerce"},{"code":"PRIV_VENDEUR","libelle"
|
||||
:"Privilèges du vendeur de fonds de commerce et d'action résolutoire"},{"code":"NAN_OUTIL","libelle"
|
||||
:"Nantissements de l'outillage, matériel et équipement"},{"code":"DECL_CREANCES","libelle":"Déclaration
|
||||
de créance"}]},{"code":"C3","libelle":"Catégorie 3","typesInscription":[{"code":"OP_CREDIT_BAIL","libelle"
|
||||
:"Opérations de crédit-bail en matière mobilière"},{"code":"PUB_CONTRAT_LOC","libelle":"Publicité de
|
||||
contrats de location"},{"code":"PUB_RESEV_PROPR","libelle":"Publicité de clauses de réserve de propri
|
||||
été"}]},{"code":"C4","libelle":"Catégorie 4","typesInscription":[{"code":"GAGE_STOCKS","libelle":"Gage
|
||||
des stocks"},{"code":"WARRANTS_CAT","libelle":"Warrants"}]},{"code":"C5","libelle":"Catégorie 5","typesInscription"
|
||||
:[{"code":"PRETS_DELAIS","libelle":"Prêts et délais"},{"code":"BIENS_INALIENABLES","libelle":"Biens inali
|
||||
énables"}]}]},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"STATUT_A_JOUR"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","depotActeNumero":4,"acteChrono":2},"dateActe":1418770800000,"typeActe":{"code":"STAJh","libelle"
|
||||
:"Statuts mis à jour"},"nbPages":16,"decisions":[],"depot":{"numeroDepot":"4","numeroDepotManu":3459
|
||||
,"dateDepot":1419980400000}},"miseAuPanier":null},{"modesDeDiffusionDispos":["C"],"produit":{"typeProduit"
|
||||
:"ACTE","modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut"
|
||||
:"B","dossierChrono":"20094","depotActeNumero":1,"acteChrono":1},"dateActe":652485600000,"typeActe":
|
||||
{"code":"ORDPREh","libelle":"Ordonnance du président"},"nbPages":0,"decisions":[{"natureDecision":{"code"
|
||||
:"AGPRh","libelle":"Prorogation du délai de réunion de l'A.G. chargée d'approuver les comptes"},"libelle"
|
||||
:null}],"depot":{"numeroDepot":"1","numeroDepotManu":16,"dateDepot":655686000000}},"miseAuPanier":null
|
||||
},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"ACTE","modifiable":true,"identifiant"
|
||||
:{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","depotActeNumero"
|
||||
:2,"acteChrono":1},"dateActe":807832800000,"typeActe":{"code":"PVAh","libelle":"Procès-verbal d'assembl
|
||||
ée"},"nbPages":19,"decisions":[],"depot":{"numeroDepot":"2","numeroDepotManu":814,"dateDepot":812156400000
|
||||
}},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"ACTE","modifiable"
|
||||
:true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","depotActeNumero":2,"acteChrono":2},"dateActe":807832800000,"typeActe":{"code":"STAJh","libelle"
|
||||
:"Statuts mis à jour"},"nbPages":19,"decisions":[],"depot":{"numeroDepot":"2","numeroDepotManu":814,"dateDepot"
|
||||
:812156400000}},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit"
|
||||
:"ACTE","modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut"
|
||||
:"B","dossierChrono":"20094","depotActeNumero":2,"acteChrono":3},"dateActe":807832800000,"typeActe":
|
||||
{"code":"DIVERSh","libelle":"Divers"},"nbPages":19,"decisions":[{"natureDecision":{"code":"ZDIVh","libelle"
|
||||
:"Divers"},"libelle":"EXTENSION OBJET SOCIAL & ACTIVITE"}],"depot":{"numeroDepot":"2","numeroDepotManu"
|
||||
:814,"dateDepot":812156400000}},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit"
|
||||
:{"typeProduit":"ACTE","modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut"
|
||||
:"B","dossierChrono":"20094","depotActeNumero":3,"acteChrono":1},"dateActe":1216072800000,"typeActe"
|
||||
:{"code":"PVAh","libelle":"Procès-verbal d'assemblée"},"nbPages":4,"decisions":[{"natureDecision":{"code"
|
||||
:"ZDIVh","libelle":"Divers"},"libelle":"MODIFICATION DE L'AFFECTATION DU RESULTAT - EXERCICE CLOS LE
|
||||
31.12.2007"}],"depot":{"numeroDepot":"3","numeroDepotManu":1373,"dateDepot":1219960800000}},"miseAuPanier"
|
||||
:null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"ACTE","modifiable":true,"identifiant"
|
||||
:{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","depotActeNumero"
|
||||
:4,"acteChrono":1},"dateActe":1418770800000,"typeActe":{"code":"PVAGEXh","libelle":"Procès-verbal d'assembl
|
||||
ée générale extraordinaire"},"nbPages":3,"decisions":[{"natureDecision":{"code":"EXCLOTh","libelle":"Changement
|
||||
relatif à la date de clôture de l'exercice social"},"libelle":null}],"depot":{"numeroDepot":"4","numeroDepotManu"
|
||||
:3459,"dateDepot":1419980400000}},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","M","T"],"produit"
|
||||
:{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime"
|
||||
:"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2013,"bilanNumero":1427},"type":"BS"
|
||||
,"sousCode":"SP","dateClotureExercice":1388444400000,"denominationEIRL":null,"disponibleXbrl":false}
|
||||
,"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2013,"bilanNumero":1427},"type":"BS","sousCode":"BL","dateClotureExercice"
|
||||
:1388444400000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2012,"bilanNumero"
|
||||
:2537},"type":"BS","sousCode":"SP","dateClotureExercice":1356908400000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2012,"bilanNumero":2537},"type":"BS","sousCode":"BL","dateClotureExercice"
|
||||
:1356908400000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2011,"bilanNumero"
|
||||
:1672},"type":"BS","sousCode":"SP","dateClotureExercice":1325286000000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2011,"bilanNumero":1672},"type":"BS","sousCode":"BL","dateClotureExercice"
|
||||
:1325286000000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2010,"bilanNumero"
|
||||
:2196},"type":"BS","sousCode":"SP","dateClotureExercice":1293750000000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2010,"bilanNumero":2196},"type":"BS","sousCode":"BL","dateClotureExercice"
|
||||
:1293750000000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2009,"bilanNumero"
|
||||
:969},"type":"BS","sousCode":"SP","dateClotureExercice":1262214000000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2009,"bilanNumero":969},"type":"BS","sousCode":"BL","dateClotureExercice":1262214000000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2008,"bilanNumero"
|
||||
:1427},"type":"BS","sousCode":"SP","dateClotureExercice":1230678000000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2008,"bilanNumero":1427},"type":"BS","sousCode":"BL","dateClotureExercice"
|
||||
:1230678000000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2007,"bilanNumero"
|
||||
:902},"type":"BS","sousCode":"SP","dateClotureExercice":1199055600000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2007,"bilanNumero":902},"type":"BS","sousCode":"BL","dateClotureExercice":1199055600000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2006,"bilanNumero"
|
||||
:891},"type":"BS","sousCode":"SP","dateClotureExercice":1167519600000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2006,"bilanNumero":891},"type":"BS","sousCode":"BL","dateClotureExercice":1167519600000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2005,"bilanNumero"
|
||||
:769},"type":"BS","sousCode":"SP","dateClotureExercice":1135983600000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","C","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2005,"bilanNumero":769},"type":"BS","sousCode":"BL","dateClotureExercice":1135983600000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2004,"bilanNumero"
|
||||
:704},"type":"BS","sousCode":"SP","dateClotureExercice":1104447600000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2004,"bilanNumero":704},"type":"BS","sousCode":"BL","dateClotureExercice":1104447600000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2003,"bilanNumero"
|
||||
:850},"type":"BS","sousCode":"SP","dateClotureExercice":1072825200000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2003,"bilanNumero":850},"type":"BS","sousCode":"BL","dateClotureExercice":1072825200000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2002,"bilanNumero"
|
||||
:959},"type":"BS","sousCode":"SP","dateClotureExercice":1041289200000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2002,"bilanNumero":959},"type":"BS","sousCode":"BL","dateClotureExercice":1041289200000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2001,"bilanNumero"
|
||||
:561},"type":"BS","sousCode":"SP","dateClotureExercice":1009753200000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2001,"bilanNumero":561},"type":"BS","sousCode":"BL","dateClotureExercice":1009753200000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"M","T"],"produit":{"typeProduit":"BILAN_SAISI","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":2000,"bilanNumero"
|
||||
:644},"type":"BS","sousCode":"SP","dateClotureExercice":978217200000,"denominationEIRL":null,"disponibleXbrl"
|
||||
:false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET"
|
||||
,"modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094","bilanMillesime":2000,"bilanNumero":644},"type":"BS","sousCode":"BL","dateClotureExercice":978217200000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"T"],"produit":{"typeProduit":"BILAN_COMPLET","modifiable":true,"identifiant":{"codeGreffe":"1305","dossierMillesime"
|
||||
:"86","dossierStatut":"B","dossierChrono":"20094","bilanMillesime":1999,"bilanNumero":986},"type":"BS"
|
||||
,"sousCode":"BL","dateClotureExercice":946594800000,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier"
|
||||
:null},{"modesDeDiffusionDispos":["V","T"],"produit":{"typeProduit":"BILAN_COMPLET","modifiable":true
|
||||
,"identifiant":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"
|
||||
,"bilanMillesime":1998,"bilanNumero":614},"type":"BS","sousCode":"BL","dateClotureExercice":915058800000
|
||||
,"denominationEIRL":null,"disponibleXbrl":false},"miseAuPanier":null},{"modesDeDiffusionDispos":["V"
|
||||
,"T"],"produit":{"typeProduit":"HISTO_MODIFS_RCS","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"}},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","C"],"produit":{"typeProduit":"CERTIF_PROC_COLLECTIVE","modifiable":true,"identifiant":{"codeGreffe"
|
||||
:"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"}},"miseAuPanier":null},{"modesDeDiffusionDispos"
|
||||
:["V","C"],"produit":{"typeProduit":"DOSSIER_COMPLET","modifiable":true,"identifiant":{"codeGreffe":"1305"
|
||||
,"dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"},"detailProduits":[{"typeProduit"
|
||||
:"EXTRAIT","modesDeDiffusionDispos":["V","C","M","T"]},{"typeProduit":"ETAT_ENDETEMENT","modesDeDiffusionDispos"
|
||||
:["V","C"]},{"typeProduit":"BILAN_COMPLET","modesDeDiffusionDispos":["V","C","T"],"dateClotureExercice"
|
||||
:1388444400000},{"typeProduit":"STATUT_A_JOUR","modesDeDiffusionDispos":["V","C","T"]},{"typeProduit"
|
||||
:"CERTIF_PROC_COLLECTIVE","modesDeDiffusionDispos":["V","C"]}]},"miseAuPanier":null}]}
|
||||
|
||||
ordrePresentationParProduit.EXTRAIT = 1 (+ cataloguePrix)
|
||||
|
||||
|
||||
6 - POST AJAX https://www.infogreffe.fr/services/produits/rest/panier/extrait
|
||||
idDossier 130586B20094
|
||||
modesDeDiffusion V
|
||||
modesDeDiffusion T
|
||||
nbExemplaires 0
|
||||
|
||||
{"nbDocuments":1,"nbDocumentsParTypeProduit":1,"total":3.9,"totalReduit":3.9,"hasCourrier":false,"cartoucheTotal"
|
||||
:3.9,"cartoucheReduitTotal":3.9,"produitTotal":3.9,"produitReduitTotal":3.9}
|
||||
|
||||
7 - https://www.infogreffe.fr/services/produits/rest/panier
|
||||
|
||||
{"panier":{"panierCartouches":[{"prixCartouche":{"totalTtc":3.9},"identite":{"dossier":{"idDossier":
|
||||
{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"},"nomGreffeImmat"
|
||||
:"TARASCON","siren":338437189,"denomination":"PROVENCE PLOMBERIE","etatposeSurveillance":null},"debiteur"
|
||||
:null,"listeEntreprises":null,"affaire":null,"nomGreffeImmat":"TARASCON"},"ordrePresentationParProduit"
|
||||
:{"EXTRAIT":1},"produits":[{"produit":{"typeProduit":"EXTRAIT","modifiable":true,"identifiant":{"codeGreffe"
|
||||
:"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono":"20094"},"kbisPeriodique":true},"miseAuPanier"
|
||||
:{"prixProduit":{"totalTtc":3.9},"modesDeDiffusionSelectionnes":["V","T"],"nbExemplaires":null,"envoiPeriodique"
|
||||
:{"periodicite":0,"duree":0},"modifiable":true},"libelleProduit":"Extrait RCS (K bis)"}],"prixTotalActes"
|
||||
:0.0,"prixTotalDap":0.0}],"prixTotal":{"totalTtc":3.9},"hasCourrier":false}}
|
||||
|
||||
8 - https://www.infogreffe.fr/services/produits/rest/panier/resume
|
||||
|
||||
{"nbDocuments":1,"nbDocumentsParTypeProduit":0,"total":3.9,"totalReduit":3.9,"hasCourrier":false}
|
||||
|
||||
9 - GET https://www.infogreffe.fr/services/achatclient/rest/achat/createCmdAbonne
|
||||
|
||||
{"numCommande":"173829445","modeDiffusionCourrier":false}
|
||||
|
||||
10 - GET https://www.infogreffe.fr/services/commandeclient/rest/client/recapCommande?numeroCommande=173829445
|
||||
numeroCommande 173829445
|
||||
|
||||
{"commande":{"idCommande":"173829445","date":1433493693000,"totalTTC":3.9,"totalTVA":0.65,"totalHT":null
|
||||
,"refCommande":"YGWJN","moyenPaiement":"COMPTE_ABONNE","numeroCartePrepayee":null,"cartouches":[{"intitule"
|
||||
:{"dossier":{"idDossier":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094"},"nomGreffeImmat":"TARASCON","siren":338437189,"denomination":"PROVENCE PLOMBERIE","etatposeSurveillance"
|
||||
:"SURVEILLABLE"},"debiteur":null,"listeEntreprises":null,"affaire":null,"nomGreffeImmat":"TARASCON"}
|
||||
,"produitsEntreprise":[{"ligneCommande":1,"document":"EXCP","produitTTC":3.9000000000000004,"produitHT"
|
||||
:0.0,"fraisDePortHT":0.0,"documentsProduit":[{"modeDiffusion":"V","nbExemplaires":1,"urlTelechargement"
|
||||
:null,"codeSuiviLivraison":null},{"modeDiffusion":"T","nbExemplaires":1,"urlTelechargement":null,"codeSuiviLivraison"
|
||||
:null}],"inDossierComplet":null,"envoiPeriodique":{"periodicite":0,"duree":0},"refEnvoiPeriodique":null
|
||||
}]}],"refCommandeClient":null,"refEnvoiPeriodique":null,"denominationSociete":null,"nomClient":"SCORES
|
||||
ET DECISIONS SAS","abNume":"0041","abAbonne":"2559","email":"CONTACT@SCORES-DECISIONS.COM","solde":null
|
||||
,"nbDocuments":null,"fraisDePortHT":0.0}}
|
||||
|
||||
11 - GET https://www.infogreffe.fr/services/commandeclient/rest/client/recapCommande?numeroCommande=173829445
|
||||
numeroCommande 173829445
|
||||
|
||||
{"commande":{"idCommande":"173829445","date":1433493693000,"totalTTC":3.9,"totalTVA":0.65,"totalHT":null
|
||||
,"refCommande":"YGWJN","moyenPaiement":"COMPTE_ABONNE","numeroCartePrepayee":null,"cartouches":[{"intitule"
|
||||
:{"dossier":{"idDossier":{"codeGreffe":"1305","dossierMillesime":"86","dossierStatut":"B","dossierChrono"
|
||||
:"20094"},"nomGreffeImmat":"TARASCON","siren":338437189,"denomination":"PROVENCE PLOMBERIE","etatposeSurveillance"
|
||||
:"SURVEILLABLE"},"debiteur":null,"listeEntreprises":null,"affaire":null,"nomGreffeImmat":"TARASCON"}
|
||||
,"produitsEntreprise":[{"ligneCommande":1,"document":"EXCP","produitTTC":3.9000000000000004,"produitHT"
|
||||
:0.0,"fraisDePortHT":0.0,"documentsProduit":[{"modeDiffusion":"V","nbExemplaires":1,"urlTelechargement"
|
||||
:null,"codeSuiviLivraison":null},{"modeDiffusion":"T","nbExemplaires":1,"urlTelechargement":null,"codeSuiviLivraison"
|
||||
:null}],"inDossierComplet":null,"envoiPeriodique":{"periodicite":0,"duree":0},"refEnvoiPeriodique":null
|
||||
}]}],"refCommandeClient":null,"refEnvoiPeriodique":null,"denominationSociete":null,"nomClient":"SCORES
|
||||
ET DECISIONS SAS","abNume":"0041","abAbonne":"2559","email":"CONTACT@SCORES-DECISIONS.COM","solde":null
|
||||
,"nbDocuments":null,"fraisDePortHT":0.0}}
|
||||
|
||||
12 - GET https://www.infogreffe.fr/societes/panier/confirmation?numCommande=173829445&typeClient=AB&etapeCoord=false
|
||||
etapeCoord false
|
||||
numCommande 173829445
|
||||
typeClient AB
|
||||
=> HTML
|
||||
Téléchargement du KBIS
|
||||
|
||||
<tbody class="commandeDocs">
|
||||
<a href="javascript:void(0);" class="voirRouge" style="color: red;">Télécharger</a>
|
||||
|
||||
https://www.infogreffe.fr/services/commandeclient/rest/client/visupdf?numeroCommande=173829445&ligneCommande=1&visualisation=undefined
|
||||
|
||||
|
||||
|
||||
13 - GET https://www.infogreffe.fr/services/commandeclient/rest/client/recapCommande?numeroCommande=173829445
|
||||
=> Voir 10
|
||||
|
||||
14 -
|
||||
|
||||
|
||||
*/
|
@ -20,10 +20,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
@ -18,10 +18,7 @@ require_once 'Zend/Loader/AutoloaderFactory.php';
|
||||
require_once 'Zend/Loader/ClassMapAutoloader.php';
|
||||
Zend_Loader_AutoloaderFactory::factory(array(
|
||||
'Zend_Loader_ClassMapAutoloader' => array(
|
||||
__DIR__ . '/../../library/Zend/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/Scores/autoload_classmap.php',
|
||||
__DIR__ . '/../../application/autoload_classmap.php',
|
||||
__DIR__ . '/../../library/autoload_classmap.php',
|
||||
),
|
||||
'Zend_Loader_StandardAutoloader' => array(
|
||||
'prefixes' => array(
|
||||
|
Loading…
Reference in New Issue
Block a user