Librairie Metier Update
This commit is contained in:
parent
4557872209
commit
95e30d8304
@ -1601,12 +1601,17 @@ class MInsee
|
||||
//echo "Adresse avec Numéro de voie\n";
|
||||
//print_r($tabAdrTmp);
|
||||
$tabRet['num']=$tabAdrTmp[1];
|
||||
if (preg_match("/^\b(B|BIS|T|TER|Q|a|c|d|e|f|g|h|i|j|k|l|m|n|o|p|r|s)\b(.*)/i", $tabAdrTmp[2], $tabAdrTmp2))
|
||||
if (preg_match("/^\s(B|BIS|T|TER|Q|a|c|d|e|f|g|h|i|j|k|l|m|n|o|p|s)\s(.*)/i", $tabAdrTmp[2], $tabAdrTmp2))
|
||||
{ //echo "Adresse avec Bis, Ter, Q...\n";
|
||||
//print_r($tabAdrTmp2);
|
||||
$tabRet['indRep']=trim($tabAdrTmp2[1]); $typeVoie=trim($tabAdrTmp2[2]);}
|
||||
else $typeVoie=trim($tabAdrTmp[2]);
|
||||
} else $typeVoie=trim($strLigneDAdresse);
|
||||
$tabRet['indRep']=strtoupper(trim($tabAdrTmp2[1]));
|
||||
$typeVoie=trim($tabAdrTmp2[2]);
|
||||
} else {
|
||||
$typeVoie=trim($tabAdrTmp[2]);
|
||||
}
|
||||
} else {
|
||||
$typeVoie=trim($strLigneDAdresse);
|
||||
}
|
||||
// On récupère le type de voie si possible et le libellé de la voie
|
||||
$voieTrouvee=false;
|
||||
foreach ($this->tabCodeVoie as $code=>$voie) {
|
||||
@ -1832,7 +1837,7 @@ class MInsee
|
||||
$nbTot=$tabTmp[0][0];
|
||||
$listeEtab=$this->iDb->select('etablissements e',
|
||||
"'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, LPAD(e.siren, 9, 0) as siren, LPAD(e.nic, 5, 0), e.siege, ".
|
||||
"e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
|
||||
"e.raisonSociale, e.enseigne, e.sigle, LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
|
||||
"e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, e.adr_dep, LPAD(e.adr_com,3,0) AS adr_com, LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep,".
|
||||
"CONCAT(e.siren, e.nic) as siret, e.actif",
|
||||
"TEL=$id OR FAX=$id $filtreActif ORDER BY e.siege DESC, e.actif DESC $limit", false, MYSQL_ASSOC);
|
||||
@ -1866,7 +1871,7 @@ class MInsee
|
||||
$nbTot=$tabTmp[0][0];
|
||||
$listeEtab=$this->iDb->select('etablissements e',
|
||||
"'Etab' as Loc, e.id, e.source, e.source_id, e.triCode, e.autre_id, e.siren, e.nic, e.siege, ".
|
||||
"e.raisonSociale, e.enseigne, e.sigle, e.adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
|
||||
"e.raisonSociale, e.enseigne, e.sigle, LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, ".
|
||||
"e.adr_comp, LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, e.adr_dep, LPAD(e.adr_com,3,0) AS adr_com, LPAD(e.tel,10,0) AS tel, LPAD(e.fax,10,0) AS fax, e.cj, e.ape_etab, e.ape_entrep, e.teff_etab, ".
|
||||
"CONCAT(e.siren, e.nic) as siret, e.actif",
|
||||
"autre_id IN ('$strId') $filtreActif $strDep ORDER BY siege DESC $limit", false, MYSQL_ASSOC);
|
||||
@ -2293,7 +2298,7 @@ class MInsee
|
||||
/** Informations INSEE **/
|
||||
if ($siren>100) {
|
||||
$insee = $this->iDb->select('insee.identite',
|
||||
'ACTIF%10 AS ACTIF, actifEco%10 AS actifEco, NOM, NOM2, SIGLE, ENSEIGNE, ADR_NUMVOIE, ADR_BTQ, ADR_TYPVOIE, ADR_LIBVOIE, ADR_LIBCOM, ADR_CP, ADR_COMP, ADR_DISTSP, PAYS, DCREN, SIEGE, AUXILT, SAISONAT, CJ, CIVILITE, NBETAB, APE_ENT, APE_ETAB, PROCOL, PROCOL_TYPE, PROCOL_DATE, CAPITAL, EFF_ENT, NUMRC, TEL, FAX, DIR_FCT, DIR_IDEN, DIR_DATEN, DIR_LIEUN, CAPITAL_DATE, CAPITAL_DEV, DCRET, TEFF_ENT, ADR_DEP, LPAD(ADR_COM,3,0) AS ADR_COM, TCA, TCAEXP, EFF_ET, TEFF_ET, CODEVOIE, DATE_MAJ, APRM, ACTIVNAT, ORIGINE, MODET, EXPLET, LIEUACT, ACTISURF, DEFET, MODEN, PRODPART, EXPLEN, MONOREG, REGIMP, MONOACT, DEFEN, DEFET, IDENTITE_PRE, insL1_NOMEN, insL2_COMP, insL3_CADR, insL4_VOIE, insL5_DISP, insL6_POST, insL7_ETRG, dateMajRNVP, insCATEGORIE, insIND_PUBLIPO, RPET, ARRONET, CTONET, DU, TU, UU, TCD, ZEMET, ESAANN, ESAAPEN, DREACTET, AMINTRET, DREACTEN, AMINTREN, NOMEN_LONG, CEDEX, EPCI, NOM_COM, NATETAB, PRODET, PRODEN',
|
||||
'ACTIF%10 AS ACTIF, actifEco%10 AS actifEco, NOM, NOM2, SIGLE, ENSEIGNE, ADR_NUMVOIE, ADR_BTQ, ADR_TYPVOIE, ADR_LIBVOIE, ADR_LIBCOM, ADR_CP, ADR_COMP, ADR_DISTSP, PAYS, DCREN, SIEGE, AUXILT, SAISONAT, CJ, CIVILITE, NBETAB, APE_ENT, APE_ETAB, PROCOL, PROCOL_TYPE, PROCOL_DATE, CAPITAL, EFF_ENT, NUMRC, TEL, FAX, DIR_FCT, DIR_IDEN, DIR_DATEN, DIR_LIEUN, CAPITAL_DATE, CAPITAL_DEV, DCRET, TEFF_ENT, ADR_DEP, LPAD(ADR_COM,3,0) AS ADR_COM, TCA, TCAEXP, EFF_ET, TEFF_ET, CODEVOIE, DATE_MAJ, APRM, ACTIVNAT, ORIGINE, MODET, EXPLET, LIEUACT, ACTISURF, DEFET, MODEN, PRODPART, EXPLEN, MONOREG, REGIMP, MONOACT, DEFEN, DEFET, IDENTITE_PRE, insL1_NOMEN, insL2_COMP, insL3_CADR, insL4_VOIE, insL5_DISP, insL6_POST, insL7_ETRG, dateMajRNVP, insCATEGORIE, insIND_PUBLIPO, RPET, ARRONET, CTONET, DU, TU, UU, TCD, ZEMET, ESAANN, ESAAPEN, DREACTET, AMINTRET, DREACTEN, AMINTREN, NOMEN_LONG, CEDEX, EPCI, NOM_COM, NATETAB, PRODET, PRODEN, hexavia',
|
||||
"SIREN=$siren $strNic ORDER BY SIEGE DESC, ACTIF DESC LIMIT 0,1",false,MYSQL_ASSOC);
|
||||
if (count($insee)>0) {
|
||||
$tabInsee=$insee[0];
|
||||
@ -2668,6 +2673,7 @@ class MInsee
|
||||
'AdresseBtq'=>$etab['adr_btq'],
|
||||
'AdresseVoie'=>$etab['adr_typeVoie'],
|
||||
'AdresseRue'=>$etab['adr_libVoie'],
|
||||
'AdresseDistSP'=>$tabInsee['ADR_DISTSP'],
|
||||
'CP'=>$etab['adr_cp'],
|
||||
'Ville'=>$etab['adr_ville'],
|
||||
'Pays'=>$tabInsee['PAYS'],
|
||||
@ -2739,7 +2745,8 @@ class MInsee
|
||||
'dir1Titre'=>self::$tabFct[$tabInsee['DIR_FCT']],
|
||||
'dir1NomPrenom'=>preg_replace('/^EIRL\s/','',$tabInsee['DIR_IDEN']),
|
||||
'dir1Genre'=>$dir1Genre,
|
||||
'Rivoli'=>substr($tabInsee['CODEVOIE'],0,4).' '.substr($tabInsee['CODEVOIE'],-1),
|
||||
'Rivoli'=>trim(substr($tabInsee['CODEVOIE'],0,4).' '.substr($tabInsee['CODEVOIE'],-1)),
|
||||
'Hexavia'=>$tabInsee['hexavia'],
|
||||
'InfosIris'=>$tabIris,
|
||||
'NatureActivite'=>$tabInsee['ACTIVNAT'], // Nature de l'activité
|
||||
'OrigineCreation'=>$tabInsee['ORIGINE'], // Origine de la création
|
||||
@ -3760,7 +3767,7 @@ class MInsee
|
||||
$bodacc=$this->iDb->select(
|
||||
'bodacc_dirigeants d, bodacc_detail b, bodacc_fonctions f',
|
||||
'd.num, d.dateEffet, d.Rubrique, d.fonction, d.dirSiren, d.rs, d.nom, d.prenom, d.nomUsage, d.depart, d.dateInsert, f.libelle',
|
||||
"b.SIREN=$siren AND b.id=d.id AND b.typeEven NOT BETWEEN 5000 AND 5700 AND b.typeEven NOT BETWEEN 2700 AND 2900 AND d.fonction=f.codeFct GROUP BY d.fonction, d.rs, d.nom, d.prenom ORDER BY d.dateEffet DESC, d.fonction DESC", true, MYSQL_ASSOC);
|
||||
"b.SIREN=$siren AND b.id=d.id AND b.typeEven NOT BETWEEN 5000 AND 5700 AND b.typeEven NOT BETWEEN 2700 AND 2900 AND d.fonction=f.codeFct GROUP BY d.fonction, d.rs, d.nom, d.prenom ORDER BY d.dateInsert DESC, d.dateEffet DESC, d.fonction DESC", true, MYSQL_ASSOC);
|
||||
if (count($bodacc)>0) {
|
||||
foreach ($bodacc as $k=>$ann) {
|
||||
$tabRet[]=array(
|
||||
@ -6592,33 +6599,59 @@ class MInsee
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param unknown $codeCommune
|
||||
* @param unknown $adrTypVoie
|
||||
* @param unknown $adrLibVoie
|
||||
* @return string|Ambigous <string, multitype:>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Code Voie Rivoli
|
||||
* @param unknown $codeCommune
|
||||
* @param unknown $adrTypVoie
|
||||
* @param unknown $adrLibVoie
|
||||
* @return string|Ambigous <string, unknown>
|
||||
*/
|
||||
public function getCodeVoieRivoli($codeCommune, $adrTypVoie, $adrLibVoie)
|
||||
{
|
||||
$codeVoie='';
|
||||
$adrLibVoie2=addslashes($adrLibVoie);
|
||||
$tDeb=microtime(1);
|
||||
$ret=$this->iDb->select('insee.fantoirVoi', "codComInsee, idVoieCom, cleRivoli, voieNature, voieLib, 1 AS score",
|
||||
"codComInsee='$codeCommune' AND voieNature='$adrTypVoie' AND voieLib='$adrLibVoie2'",false, MYSQL_ASSOC);
|
||||
$nbRet = count($ret);
|
||||
if ($nbRet == 0) {
|
||||
return ''; //'Aucune correspondance Rivoli'.EOL;
|
||||
} else {
|
||||
foreach($ret as $i=>$iRet) {
|
||||
if ($iRet['voieNature'] == $adrTypVoie && $iRet['voieLib'] == $adrLibVoie) {
|
||||
$codeVoie=$iRet['idVoieCom'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $codeVoie;
|
||||
$codeVoie='';
|
||||
$adrTypVoie=strtoupper($adrTypVoie);
|
||||
$adrLibVoie=strtoupper($adrLibVoie);
|
||||
$adrLibVoie2=addslashes($adrLibVoie);
|
||||
$tDeb=microtime(1);
|
||||
$tabVoiesNoff=array(
|
||||
'LD'=> '',
|
||||
'R'=> 'RUE',
|
||||
'CITE'=>'CTE',
|
||||
'FG'=> 'FBG',
|
||||
'PL'=> 'PCE',
|
||||
'QU'=> 'QUAI',
|
||||
'QUA'=> 'QRT',
|
||||
//'QUA'=>'QUR',
|
||||
'SQ'=> 'SQR',
|
||||
'VLGE'=>'VGE',
|
||||
'VOI'=>'VOIE'
|
||||
);
|
||||
if (array_key_exists($adrTypVoie, $tabVoiesNoff) || in_array($adrTypVoie, $tabVoiesNoff)) {
|
||||
$typeVoieNoff=$adrTypVoie;
|
||||
$typeVoieOff=@$tabVoiesNoff[$adrTypVoie];
|
||||
if ($typeVoieOff=='QUA')
|
||||
$strTypesVoies=" AND voieNature IN('QUA','QRT','QUR') ";
|
||||
else
|
||||
$strTypesVoies=" AND voieNature IN('$typeVoieNoff','$typeVoieOff') ";
|
||||
} else {
|
||||
$typeVoieOff=$typeVoieNoff=$adrTypVoie;
|
||||
$strTypesVoies=" AND voieNature='$typeVoieOff' ";
|
||||
}
|
||||
$ret=$this->iDb->select(
|
||||
'insee.fantoirVoi', "codComInsee, idVoieCom, cleRivoli, voieNature, voieLib, 1 AS score",
|
||||
"codComInsee='$codeCommune' $strTypesVoies AND voieLib='$adrLibVoie2'",false, MYSQL_ASSOC);
|
||||
$nbRet=count($ret);
|
||||
if ($nbRet==0) return '';//'Aucune correspondance Rivoli'.EOL;
|
||||
else {
|
||||
foreach($ret as $i=>$iRet) {
|
||||
if (($iRet['voieNature']==$typeVoieOff || $iRet['voieNature']==$typeVoieNoff) && $iRet['voieLib']==$adrLibVoie) {
|
||||
$codeVoie=$iRet['idVoieCom'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $codeVoie;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -872,5 +872,86 @@ class MRncs
|
||||
$this->libErreur='Infogreffe indisponible !';
|
||||
return false;
|
||||
}
|
||||
|
||||
function getDirigeantsPrin($siren, $nbDirs=2) {
|
||||
$siren=$siren*1;
|
||||
$tabRet=array();
|
||||
$dirs=$this->iDb->select(
|
||||
'rncs_dirigeants',
|
||||
'siren, raisonSociale, dirRS, civilite, nom, prenom, naissance_nom, naissance_date, naissance_lieu, fonction_code, fonction_lib, cinf, dateFin, flux, dateInsert',
|
||||
"siren=$siren AND actif%10=1 ORDER BY fonction_code DESC", true, MYSQL_ASSOC);
|
||||
$numDir=0;
|
||||
foreach ($dirs as $k=>$dir) {
|
||||
$numDir++;
|
||||
if ($dir['naissance_date']<>'0000-00-00')
|
||||
$dateNaiss=Wdate::dateT('Y-m-d','d/m/Y', $dir['naissance_date']);
|
||||
else
|
||||
$dateNaiss='';
|
||||
if ($dir['flux']<>'0000-00-00')
|
||||
$dateModif=Wdate::dateT('Y-m-d','d/m/Y', $dir['flux']);
|
||||
else
|
||||
$dateModif=Wdate::dateT('Y-m-d','d/m/Y', $dir['dateInsert']);
|
||||
$nom=trim($dir['nom']);
|
||||
$nomUsage='';
|
||||
if (trim($dir['naissance_nom'])<>'') {
|
||||
$nom=trim($dir['naissance_nom']);
|
||||
$nomUsage=trim($dir['nom']);
|
||||
}
|
||||
$tabRet[]=array( 'Fonction' =>$dir['fonction_code'],
|
||||
'Titre' =>$dir['fonction_lib'],
|
||||
'Societe' =>$dir['dirRS'],
|
||||
'Civilite' =>$dir['civilite'],
|
||||
'Nom' =>$nom,
|
||||
'Prenom' =>$dir['prenom'],
|
||||
'NomUsage' =>$nomUsage,
|
||||
'NaissDate' =>$dateNaiss,
|
||||
'NaissVille' =>$dir['naissance_lieu'],
|
||||
'NaissDepPays' =>'', // 25
|
||||
'Ancien' =>0,
|
||||
'DateFct' =>$dateModif,
|
||||
'Cinf' =>$dir['cinf'],
|
||||
);
|
||||
if ($numDir>=$nbDirs) break;
|
||||
}
|
||||
if ($numDir==0) {
|
||||
$dirs=$this->iDb->select(
|
||||
'rncs_entrep',
|
||||
"siren, raisonSociale, '' AS dirRS, IF(sexe='M', 'M', IF(sexe='F', 'MME', '')) AS civilite, nom, prenom, nomUsage AS naissance_nom, dateNaiss AS naissance_date, lieuNaiss AS naissance_lieu, 1050 AS fonction_code, 'Personne Physique' AS fonction_lib, 0 AS cinf, dateFer AS dateFin, flux, dateInsert",
|
||||
"siren=$siren", true, MYSQL_ASSOC);
|
||||
$numDir=0;
|
||||
foreach ($dirs as $k=>$dir) {
|
||||
$numDir++;
|
||||
if ($dir['naissance_date']<>'0000-00-00')
|
||||
$dateNaiss=Wdate::dateT('Y-m-d','d/m/Y', $dir['naissance_date']);
|
||||
else
|
||||
$dateNaiss='';
|
||||
if ($dir['flux']<>'0000-00-00')
|
||||
$dateModif=Wdate::dateT('Y-m-d','d/m/Y', $dir['flux']);
|
||||
else
|
||||
$dateModif=Wdate::dateT('Y-m-d','d/m/Y', $dir['dateInsert']);
|
||||
$nom=trim($dir['nom']);
|
||||
$nomUsage='';
|
||||
if (trim($dir['naissance_nom'])<>'') {
|
||||
$nom=trim($dir['naissance_nom']);
|
||||
$nomUsage=trim($dir['nom']);
|
||||
}
|
||||
$tabRet[]=array( 'Fonction' =>$dir['fonction_code'],
|
||||
'Titre' =>$dir['fonction_lib'],
|
||||
'Societe' =>$dir['dirRS'],
|
||||
'Civilite' =>$dir['civilite'],
|
||||
'Nom' =>$nom,
|
||||
'Prenom' =>$dir['prenom'],
|
||||
'NomUsage' =>$nomUsage,
|
||||
'NaissDate' =>$dateNaiss,
|
||||
'NaissVille' =>$dir['naissance_lieu'],
|
||||
'NaissDepPays' =>'', // 25
|
||||
'Ancien' =>0,
|
||||
'DateFct' =>$dateModif,
|
||||
'Cinf' =>$dir['cinf'],
|
||||
);
|
||||
}
|
||||
}
|
||||
return $tabRet;
|
||||
}
|
||||
}
|
||||
?>
|
@ -484,10 +484,16 @@ class MRnvp
|
||||
"libCom32 , libCom38",
|
||||
"codeInseeCom='$codeInsee' LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
$nbRet=count($ret);
|
||||
if ($nbRet==0) return 'Aucune correspondance VILLE'.EOL;
|
||||
|
||||
if ($norme==32) return $ret[0]['libCom32'];
|
||||
return $ret[0]['libCom38'];
|
||||
if ($nbRet==0 && $codeInsee>99000) {
|
||||
$codePaysInsee=substr($codeInsee,2,3);
|
||||
$ret=$this->iDb->select('jo.tabPays',
|
||||
"SUBSTRING(libPays,1,32) AS libCom32, SUBSTRING(libPays,1,38) AS libCom38",
|
||||
"codePaysInsee='$codeInsee' ORDER BY dependance ASC LIMIT 0,1",false, MYSQL_ASSOC);
|
||||
$nbRet=count($ret);
|
||||
}
|
||||
if ($nbRet==0) return 'Aucune correspondance VILLE';
|
||||
elseif ($norme==32) return $ret[0]['libCom32'];
|
||||
else return $ret[0]['libCom38'];
|
||||
}
|
||||
|
||||
function getCodCommune($libelleCommune, $depOuCp='', $debug=false)
|
||||
@ -524,5 +530,41 @@ 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');
|
||||
$array = array (
|
||||
'pi_session' => '-1',
|
||||
'pi_user' => 'SDPROD',
|
||||
'pi_password' => '7631014530',
|
||||
'pi_codedossier' => '0001',
|
||||
'pi_numfichier' => '1',
|
||||
'pi_rsoc' => utf8_encode($L1),
|
||||
//'pio_civ' => '',
|
||||
//'pio_nom' => '',
|
||||
//'pio_prenom' => '',
|
||||
'pio_cnom' => utf8_encode($L2), // Ligne 2
|
||||
'pio_cadrs' => utf8_encode($L3), // Ligne 3
|
||||
'pio_adresse' => utf8_encode($L4), // Ligne 4
|
||||
'pio_lieudit' => utf8_encode($L5), // Ligne 5
|
||||
'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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
126
1.2/library/Metier/scores/Comment/Valo_v209_3.php
Normal file
126
1.2/library/Metier/scores/Comment/Valo_v209_3.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/** Auto generated class 2014-12-22 17:44:16*/
|
||||
$tabCommentaires = array(
|
||||
100 => array(
|
||||
1 => "TABLE(LINE(Version 2.09))",
|
||||
),
|
||||
5000 => array(
|
||||
1 => "TABLE(LINE(Valorisation de {NOMEN} en date du : {JOUR_DATE}))",
|
||||
),
|
||||
7000 => array(
|
||||
10 => "TABLE(LINE(ENTREPRISE INACTIVE))",
|
||||
),
|
||||
20001000 => array(
|
||||
10 => "TABLE(LINE(Cette étude a pour but de rechercher la valeur globale de l'entreprise en tenant compte des ses éléments financiers étudiés selon différentes méthodes et le cas échéant par comparaison avec les cessions d'entreprises similaires))",
|
||||
),
|
||||
20050100 => array(
|
||||
10 => "TABLE(LINE(Dans notre étude, voici les méthodes que nous avons retenues. Elles vous sont présentées sous forme de tableau avec leur fourchette de valeurs, pour une meilleure représentativité de chacune d'entre elle dans la valorisation globale de l'entreprise :))",
|
||||
),
|
||||
20080201 => array(
|
||||
2 => "TABLE(LINE(Pondération des méthodes#Valeur mini#Valeur maxi)",
|
||||
99 => ")",
|
||||
),
|
||||
20080210 => array(
|
||||
11 => "LINE(Valeur patrimoniale#{VAL978_EU}#{VAL979_EU})",
|
||||
),
|
||||
20080215 => array(
|
||||
11 => "LINE(Méthode par le Chiffre d'affaires#{VAL970_EU}#{VAL971_EU})",
|
||||
),
|
||||
20080217 => array(
|
||||
11 => "LINE(Méthode par la Situation nette comptable#{VAL976_EU}#{VAL977_EU})",
|
||||
),
|
||||
20080220 => array(
|
||||
21 => "LINE(Méthode par la Valeur de productivité#{VAL982_EU}#{VAL983_EU})",
|
||||
),
|
||||
20080230 => array(
|
||||
31 => "LINE(Méthode par le Capitalisation du bénéfice#{VAL984_EU}#{VAL985_EU})",
|
||||
),
|
||||
20080240 => array(
|
||||
41 => "LINE(Capitalisation selon l'EBE#{VAL986_EU}#{VAL987_EU})",
|
||||
),
|
||||
20080250 => array(
|
||||
51 => "LINE(Capitalisation selon la MBA#{VAL988_EU}#{VAL989_EU})",
|
||||
),
|
||||
20080260 => array(
|
||||
61 => "LINE(Capitalisation selon la CAF+Trésorerie#{VAL990_EU}#{VAL991_EU})",
|
||||
),
|
||||
20080270 => array(
|
||||
71 => "LINE(Méthosde de Capitaux risqueurs#{VAL992_EU}#{VAL993_EU})",
|
||||
),
|
||||
20080280 => array(
|
||||
81 => "LINE(Méthode Patrimoniale + GOODWILL#{VAL994_EU}#{VAL995_EU})",
|
||||
),
|
||||
20080290 => array(
|
||||
81 => "LINE(Comparative cessions profils similaires#{VAL996_EU}#{VAL997_EU})",
|
||||
),
|
||||
20090310 => array(
|
||||
2 => "TABLE(LINE(CONCLUSION #estimation haute)",
|
||||
11 => "LINE( #{VAL999_EU})",
|
||||
12 => "LINE(estimation basse# )",
|
||||
21 => "LINE({VAL998_EU}# ))",
|
||||
),
|
||||
20090510 => array(
|
||||
20 => "TABLE(LINE(Réévaluer les immobilisations corporelles ({R[052]}) à leur valeur de marché et non leur valeur comptable.))",
|
||||
),
|
||||
20090610 => array(
|
||||
20 => "TABLE(LINE(Intégrer l'ensemble des dettes à court terme, ({R[088]}), exigibles au moment de la cession.))",
|
||||
),
|
||||
20090611 => array(
|
||||
20 => "TABLE(LINE(Intégrer l'ensemble des dettes à court terme ({R[088]}) et la part des dettes à moyen et long terme ({R[089]}), exigibles au moment de la cession.))",
|
||||
),
|
||||
20090612 => array(
|
||||
20 => "TABLE(LINE(Intégrer la part des dettes à moyen et long terme ({R[089]}), exigibles au moment de la cession.))",
|
||||
),
|
||||
20090710 => array(
|
||||
20 => "TABLE(LINE(Vérifier l'exactitude des dettes financières (R[083]}), portées au bilan.))",
|
||||
),
|
||||
20090711 => array(
|
||||
20 => "TABLE(LINE(Vérifier l'exactitude des dettes fournisseurs ({R[084]}), portées au bilan.))",
|
||||
),
|
||||
20090712 => array(
|
||||
20 => "TABLE(LINE(Vérifier l'exactitude des dettes financières ({R[083]}) et fournisseurs ({R[084]}), portées au bilan.))",
|
||||
),
|
||||
20090810 => array(
|
||||
20 => "TABLE(LINE(Aucune provision ne figure au bilan.))",
|
||||
),
|
||||
20090830 => array(
|
||||
20 => "TABLE(LINE(Les provisions semblent anormalement limitées.))",
|
||||
),
|
||||
20090840 => array(
|
||||
20 => "TABLE(LINE(Les provisions semblent anormalement élevées.))",
|
||||
),
|
||||
20090910 => array(
|
||||
20 => "TABLE(LINE(Le foncier représente une part importante des actifs, une divergeance de sa valeur par rapport au marché aura un fort impact sur l'évaluation.)",
|
||||
),
|
||||
);
|
||||
$tabTriAff = array(
|
||||
100 => 100.100001,
|
||||
5000 => 1000.10005,
|
||||
7000 => 5000.10007,
|
||||
20001000 => 1001.30001,
|
||||
20050100 => 93001.300501,
|
||||
20080201 => 94002.30080201,
|
||||
20080210 => 94001.3008021,
|
||||
20080215 => 94001.30080215,
|
||||
20080217 => 94001.30080217,
|
||||
20080220 => 94001.3008022,
|
||||
20080230 => 94001.3008023,
|
||||
20080240 => 94001.3008024,
|
||||
20080250 => 94001.3008025,
|
||||
20080260 => 94001.3008026,
|
||||
20080270 => 94001.3008027,
|
||||
20080280 => 94001.3008028,
|
||||
20080290 => 94001.3008029,
|
||||
20090310 => 99001.3009031,
|
||||
20090510 => 99101.3009051,
|
||||
20090610 => 99101.3009061,
|
||||
20090611 => 99101.30090611,
|
||||
20090612 => 99101.30090612,
|
||||
20090710 => 99101.3009071,
|
||||
20090711 => 99101.30090711,
|
||||
20090712 => 99101.30090712,
|
||||
20090810 => 99101.3009081,
|
||||
20090830 => 99101.3009083,
|
||||
20090840 => 99101.3009084,
|
||||
20090910 => 99101.3009091,
|
||||
);
|
@ -227,15 +227,18 @@ function PROJEC($tabRegY,$nbAnnees) {
|
||||
global $PROJECTAUX; // Taux de projection de n à n+$nbAnnees
|
||||
global $PROJECCOEF; // Coef de corélation linéaire
|
||||
global $SIREN;
|
||||
if (count($tabRegX)==0 || count($tabRegY)==0) return false;
|
||||
|
||||
/*@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "Indiscore sur $SIREN : Regression Début", ''.
|
||||
/*
|
||||
@sendMail('production@scores-decisions.com', 'ylenaour@scores-decisions.com', "Indiscore sur $SIREN : Regression Début", ''.
|
||||
'$tabRegX='.print_r($tabRegX,true).
|
||||
'$Y='.print_r($Y,true).
|
||||
'$Yaff='.print_r($Yaff,true).
|
||||
'$PROJECTAUX='.$PROJECTAUX.EOL.
|
||||
'$PROJECCOEF='.$PROJECCOEF.EOL
|
||||
);*/
|
||||
'$tabRegY='.print_r($tabRegY,true).
|
||||
'$nbAnnees='.$nbAnnees."\r\n".
|
||||
'$Y='.print_r($Y,true)."\r\n".
|
||||
'$Yaff='.print_r($Yaff,true)."\r\n".
|
||||
'$PROJECTAUX='.$PROJECTAUX."\r\n".
|
||||
'$PROJECCOEF='.$PROJECCOEF."\r\n"
|
||||
);
|
||||
*/
|
||||
if (count($tabRegX)==0 || count($tabRegY)==0) return false;
|
||||
|
||||
$oReg= new Regression($tabRegY,$tabRegX);
|
||||
$tab=$oReg->GetProjectionDebut($nbAnnees);
|
||||
|
@ -946,6 +946,58 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
}
|
||||
}
|
||||
|
||||
// Elements provenant des bilans
|
||||
$EFFBILAN=$tabBilan[0]['YP'];
|
||||
$nm=$nbMoisBilCumul=$tabBilan[0]['DUREE_MOIS'];
|
||||
$nmp=$tabBilan[0]['DUREE_MOIS_PRE'];
|
||||
|
||||
$BILANDATE=$tabBilan[0]['DATE_CLOTURE'];
|
||||
$BILANDATEp=$tabBilan[0]['DATE_CLOTURE_PRE'];
|
||||
if ($BILANDATEp==0) $BILANDATEp=$tabBilan[1]['DATE_CLOTURE'];
|
||||
|
||||
$BILAN=$BILANp=$BILANp2=$BILANp3=$BILANp4=0;
|
||||
$BILANANNEE=substr($BILANDATE,0,4)*1;
|
||||
$BILANANNEEp=substr($BILANDATEp,0,4)*1;
|
||||
if ($BILANANNEEp>0) {
|
||||
$BILANp=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp;
|
||||
}
|
||||
|
||||
$BILANDATEp2 = $tabBilan[2]['DATE_CLOTURE'];
|
||||
$BILANANNEEp2 = substr($BILANDATEp2,0,4)*1;
|
||||
$nmp2=$tabBilan[2]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp2>0) {
|
||||
$BILANp2=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp2, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp2;
|
||||
}
|
||||
|
||||
$BILANDATEp3 = $tabBilan[3]['DATE_CLOTURE'];
|
||||
$BILANANNEEp3=substr($BILANDATEp3,0,4)*1;
|
||||
$nmp3=$tabBilan[3]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp3>0) {
|
||||
$BILANp3=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp3, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp3;
|
||||
}
|
||||
|
||||
$BILANDATEp4 =$tabBilan[4]['DATE_CLOTURE'];
|
||||
$BILANANNEEp4=substr($BILANDATEp4,0,4)*1;
|
||||
$nmp4=$tabBilan[4]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp4>0) {
|
||||
$BILANp4=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp4, $BILANDATE);
|
||||
//$nbMoisBilCumul+=$nmp4;
|
||||
}
|
||||
|
||||
// Liste des années de bilans ultérieurs
|
||||
$BILANANNEE1=$BILANANNEE+1;
|
||||
$BILANANNEE2=$BILANANNEE+2;
|
||||
$BILANANNEE3=$BILANANNEE+3;
|
||||
$BILANANNEE4=$BILANANNEE+4;
|
||||
$BILANANNEE5=$BILANANNEE+5;
|
||||
|
||||
/**
|
||||
* Calcul des ratios
|
||||
*/
|
||||
@ -1137,59 +1189,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
$tabRegX=array_reverse($tabRegX);
|
||||
|
||||
$timer['regression']=microtime(true);
|
||||
|
||||
// Elements provenant des bilans
|
||||
$EFFBILAN=$tabBilan[0]['YP'];
|
||||
$nm=$nbMoisBilCumul=$tabBilan[0]['DUREE_MOIS'];
|
||||
$nmp=$tabBilan[0]['DUREE_MOIS_PRE'];
|
||||
|
||||
$BILANDATE=$tabBilan[0]['DATE_CLOTURE'];
|
||||
$BILANDATEp=$tabBilan[0]['DATE_CLOTURE_PRE'];
|
||||
if ($BILANDATEp==0) $BILANDATEp=$tabBilan[1]['DATE_CLOTURE'];
|
||||
|
||||
$BILAN=$BILANp=$BILANp2=$BILANp3=$BILANp4=0;
|
||||
$BILANANNEE=substr($BILANDATE,0,4)*1;
|
||||
$BILANANNEEp=substr($BILANDATEp,0,4)*1;
|
||||
if ($BILANANNEEp>0) {
|
||||
$BILANp=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp;
|
||||
}
|
||||
|
||||
$BILANDATEp2 = $tabBilan[2]['DATE_CLOTURE'];
|
||||
$BILANANNEEp2 = substr($BILANDATEp2,0,4)*1;
|
||||
$nmp2=$tabBilan[2]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp2>0) {
|
||||
$BILANp2=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp2, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp2;
|
||||
}
|
||||
|
||||
$BILANDATEp3 = $tabBilan[3]['DATE_CLOTURE'];
|
||||
$BILANANNEEp3=substr($BILANDATEp3,0,4)*1;
|
||||
$nmp3=$tabBilan[3]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp3>0) {
|
||||
$BILANp3=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp3, $BILANDATE);
|
||||
$nbMoisBilCumul+=$nmp3;
|
||||
}
|
||||
|
||||
$BILANDATEp4 =$tabBilan[4]['DATE_CLOTURE'];
|
||||
$BILANANNEEp4=substr($BILANDATEp4,0,4)*1;
|
||||
$nmp4=$tabBilan[4]['DUREE_MOIS'];
|
||||
if ($BILANANNEEp4>0) {
|
||||
$BILANp4=1;
|
||||
$nbMoisBilDate=$classWdate->nbMoisEntre($BILANDATEp4, $BILANDATE);
|
||||
//$nbMoisBilCumul+=$nmp4;
|
||||
}
|
||||
|
||||
// Liste des années de bilans ultérieurs
|
||||
$BILANANNEE1=$BILANANNEE+1;
|
||||
$BILANANNEE2=$BILANANNEE+2;
|
||||
$BILANANNEE3=$BILANANNEE+3;
|
||||
$BILANANNEE4=$BILANANNEE+4;
|
||||
$BILANANNEE5=$BILANANNEE+5;
|
||||
|
||||
|
||||
/** Détection fine de l'état de fermeture éventuel à l'INSEE **/
|
||||
$tabTmp = $iDb->select('insee.insee_even', 'insEVE, insDATEVE',
|
||||
"insSIREN=$siren AND insEVE IN ('400','410','420','425','MPF','MNP') ORDER BY insDATEVE DESC",
|
||||
|
@ -1008,13 +1008,13 @@ function rechercheDir(&$formR, $deb, $nbRep, $max)
|
||||
$nom.= " nom d'usage ".$ligne['naissance_nom'];
|
||||
}
|
||||
$ligneDir[$i] = array(
|
||||
'id' => $ligne['id'],
|
||||
'nom' => $nom,
|
||||
'prenom' => $ligne['prenom'],
|
||||
'id' => $ligne['id'],
|
||||
'nom' => $nom,
|
||||
'prenom' => $ligne['prenom'],
|
||||
'fonction_lib' => $ligne['fonction_lib'],
|
||||
'naissance_nom' => $ligne['naissance_nom'],
|
||||
'naissance_date' => $ligne['naissance_date'],
|
||||
'naissance_lieu' => $ligne['naissance_lieu']
|
||||
'naissance_nom'=> $ligne['naissance_nom'],
|
||||
'naissance_date'=> $ligne['naissance_date'],
|
||||
'naissance_lieu'=> $ligne['naissance_lieu']
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user