Merge from version 2.4

This commit is contained in:
Michael RICOIS 2013-09-30 13:26:37 +00:00
commit da3d38823c
19 changed files with 201 additions and 159 deletions

View File

@ -574,8 +574,9 @@ class MBodacc
/** Initialisation du tableau privé des tribunaux **/
private function getTabTribunaux() {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$iDb=new WDB();
$rep=$iDb->select('tribunaux', 'triCode, triNom, triCP, triSiret', "triCode IS NOT NULL");
@ -592,8 +593,9 @@ class MBodacc
/** Initialisation du tableau privé des codes fonctions de direction **/
private function getTabFctDir() {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheFctDir.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheFctDir.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'FctDir.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$iDb=new WDB();
$rep=$iDb->select('bodacc_fonctions', 'codeFct, libelle', '1');
@ -650,8 +652,9 @@ class MBodacc
/** Initialisation du tableau privé des évènements **/
private function getTabEvenements() {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheEvenements.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheEvenements.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'Evenements.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$iDb=new WDB();
$rep=$iDb->select('tabEvenements', 'codEven, libEven, Bodacc_Code, Rubrique, version, lienEtab', '1', false, MYSQL_ASSOC);
@ -673,8 +676,9 @@ class MBodacc
/** Initialisation du tableau privé des devises du Bodacc **/
private function getTabDevises() {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevises.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevises.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'Devises.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$iDb=new WDB();
$rep=$iDb->select('bodacc_devises', 'libDeviseBodacc, devIso', '1', false, MYSQL_ASSOC);

View File

@ -1123,9 +1123,11 @@ class MInsee
private function setTabCodesNaf()
{
if (count($this->tabCodesNaf)==0) {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNaf.php') ) {
$this->tabCodesNaf = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNaf.php';
$this->tabCodesNace = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNace.php';
$cacheNaf = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'CodesNaf.php';
$cacheNace = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'CodesNace.php';
if ( file_exists($cacheNaf) ) {
$this->tabCodesNaf = include $cacheNaf;
$this->tabCodesNace = include $cacheNace;
} else {
$tabNafs = $tabNace = array();
$tabTmp = $this->iDb->select('tabNaf4', 'codNaf700 AS naf, libNaf700 AS LibNaf', 1, false, MYSQL_ASSOC);
@ -1170,8 +1172,9 @@ class MInsee
private function setTabCodesNafa()
{
if (count($this->tabCodesNafa)==0) {
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNafa.php') ) {
$this->tabCodesNafa = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNafa.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'CodesNafa.php';
if ( file_exists($cache) ) {
$this->tabCodesNafa = include $cache;
} else {
$tabNafs=array();
$tabTmp=$this->iDb->select( 'tabNafa', 'codNafa AS nafa, libNafa', 1, true, MYSQL_ASSOC);
@ -1438,8 +1441,9 @@ class MInsee
public function getCodesFJ()
{
$tabFJ = array();
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesFJ.php') ) {
$tabFJ = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesFJ.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'CodesFJ.php';
if ( file_exists($cache) ) {
$tabFJ = include $cache;
} else {
$tabTmp=$this->iDb->select('tabFJur', 'code AS FJ, libelle AS libFJ', 'code>=1000', false, MYSQL_ASSOC);
foreach ($tabTmp as $i=>$tabCJ)

View File

@ -78,8 +78,9 @@ class MRncs
*/
private function getTabDevisesInpi()
{
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevisesInpi.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevisesInpi.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'DevisesInpi.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$rep=$this->iDb->select('tabDevises', 'devInpi, devIso', 'devInpi>0', false, MYSQL_ASSOC);
$tabDevises=array();
@ -108,8 +109,9 @@ class MRncs
*/
public function getTabJugements()
{
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheJugements.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheJugements.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'Jugements.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$rep=$this->iDb->select('tabJugeRncs', 'codJugement, codEven', '1', false, MYSQL_ASSOC);
$tabJug=array();
@ -133,8 +135,9 @@ class MRncs
*/
private function getTabPaysInpi()
{
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CachePaysInpi.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CachePaysInpi.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'PaysInpi.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$rep=$this->iDb->select('tabPays', 'codePaysInpi, codPays', 'codePaysInpi>0', false, MYSQL_ASSOC);
$tabPays=array();
@ -283,8 +286,9 @@ class MRncs
*/
private function getTabTribunaux()
{
if ( file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php') ) {
return include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php';
$cache = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php';
if ( file_exists($cache) ) {
return include $cache;
} else {
$rep=$this->iDb->select('tribunaux', 'triNumGreffe, triNom, triId, triCode', 'triNumGreffe IS NOT NULL', false, MYSQL_ASSOC);
$tabTribunaux=array();

View File

@ -17,7 +17,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
$numBil=0;
$numBilType=array();
foreach ($tabBilans as $millesime=>$bil) {
$tabTmp=$mBil->getBilan(substr($millesime,-10), substr($millesime,0,1), '', $accesPartenaire, $nbRatiosMax=5);
$tabTmp=@$mBil->getBilan(substr($millesime,-10), substr($millesime,0,1), @$bil['ref'], $accesPartenaire, $nbRatiosMax=5);
$numBilType[substr($millesime,0,1)]++;
if (substr($millesime,0,1)=='S') {
if ($numBilType['S']>$nbRatiosMax) continue;
@ -44,7 +44,6 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
$nm=$p['DUREE_MOIS'];
$nmp=$p['DUREE_MOIS_PRE'];
$R=array();
$R[0]=0;
if (!isset($R[0])) $R[0]='NS';
$R[1]=$p['FJ'];
@ -109,7 +108,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[52])) $R[52]='NS';
$R[53]=$p['CS']+ $p['CU']+ $p['BB']+ $p['BD']+ $p['BF']+ $p['BH']- $p['CT']- $p['CV']- $p['BC']- $p['BE']- $p['BG']- $p['BI'];
if (!isset($R[53])) $R[53]='NS';
$R[59]=$R[051]+$R[052]+$R[053];
$R[59]=$R[51]+$R[52]+$R[53];
if (!isset($R[59])) $R[59]='NS';
$R[60]=$p['BL']+ $p['BN']+ $p['BP']+ $p['BR']+ $p['BT']- $p['BM']- $p['BO']- $p['BQ']- $p['BS']- $p['BU'];
if (!isset($R[60])) $R[60]='NS';
@ -119,13 +118,13 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[62])) $R[62]='NS';
$R[63]=$p['CD']+$p['CF']-$p['CE']-$p['CG'];
if (!isset($R[63])) $R[63]='NS';
$R[64]=($R[063]*12)/$nm;
$R[64]=($R[63]*12)/$nm;
if (!isset($R[64])) $R[64]='NS';
$R[65]=$R[061]+$R[062];
$R[65]=$R[61]+$R[62];
if (!isset($R[65])) $R[65]='NS';
$R[67]=($R[059]*12)/$nm;
$R[67]=($R[59]*12)/$nm;
if (!isset($R[67])) $R[67]='NS';
$R[69]=$R[060]+$R[061]+$R[062]+$R[063];
$R[69]=$R[60]+$R[61]+$R[62]+$R[63];
if (!isset($R[69])) $R[69]='NS';
$R[70]=$p['DL']+$p['DO']-$p['AA']-($p['CL']+$p['CM']+$p['CN'])+$p['ED'];
if (!isset($R[70])) $R[70]='NS';
@ -137,13 +136,13 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[73])) $R[73]='NS';
$R[74]=$p['DK'];
if (!isset($R[74])) $R[74]='NS';
$R[79]=$R[070]+$R[071]+$R[072];
$R[79]=$R[70]+$R[71]+$R[72];
if (!isset($R[79])) $R[79]='NS';
$R[80]=$p['DS']+$p['DT']+$p['DU']+$p['DV']-$p['EH']-$p['VI'];if ($R[80]<0) $R[80]=0;
if (!isset($R[80])) $R[80]='NS';
$R[81]=$p['VG1']+$p['VH1'];
if (!isset($R[81])) $R[81]='NS';
$R[82]=$R[070];if ($R[82]<0) $R[82]=0;
$R[82]=$R[70];if ($R[82]<0) $R[82]=0;
if (!isset($R[82])) $R[82]='NS';
$R[83]=$p['DS']+$p['DT']+$p['DU']+$p['DV']-$p['EH']-$p['VI'];if ($R[83]<0) $R[83]=0;
if (!isset($R[83])) $R[83]='NS';
@ -151,7 +150,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[84])) $R[84]='NS';
$R[85]=$p['DY'];
if (!isset($R[85])) $R[85]='NS';
$R[86]=$p['DZ']+ $p['EA']+ $p['EB']+ $R[080];
$R[86]=$p['DZ']+ $p['EA']+ $p['EB']+ $R[80];
if (!isset($R[86])) $R[86]='NS';
$R[87]=$p['YS']+ $p['EH'];
if (!isset($R[87])) $R[87]='NS';
@ -159,13 +158,13 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[88])) $R[88]='NS';
$R[89]=$p['DS']+ $p['DT']+ $p['DU']+ $p['DV']- $p['EH']- $p['VI'];
if (!isset($R[89])) $R[89]='NS';
$R[90]=$R[083]+$R[084]+$R[085]+$R[086]+$R[087];
$R[90]=$R[83]+$R[84]+$R[85]+$R[86]+$R[87];
if (!isset($R[90])) $R[90]='NS';
$R[91]=$p['DL']+$p['DO']+$p['DR']+$p['VI']-$p['DJ']-$p['DK']-$p['AA'];
if (!isset($R[91])) $R[91]='NS';
$R[92]=($p['DL']+$p['DO']+$p['DR']+$p['VI']-$p['DJ']-$p['DK']-$p['AA'])/$p['EE'];
if (!isset($R[92])) $R[92]='NS';
$R[93]=($R[069]*12)/$nm;
$R[93]=($R[69]*12)/$nm;
if (!isset($R[93])) $R[93]='NS';
$R[101]=$p['FL'];
if (!isset($R[101])) $R[101]='NS';
@ -237,11 +236,11 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[199])) $R[199]='NS';
$R[201]=$p['DL']+ $p['DO']+ $p['DR']+ $p['VI']- $p['AA'];
if (!isset($R[201])) $R[201]='NS';
$R[202]=$R[201]+$R[080];
$R[202]=$R[201]+$R[80];
if (!isset($R[202])) $R[202]='NS';
$R[203]=$p['YY'];if ($R[203]==0) $R[203]=(($p['FJ']*$tva)/100);
if (!isset($R[203])) $R[203]='NS';
$R[204]=(($R[203]+$R[005])*12/$nm)/360;if ($R[204]<0) $R[204]=0;
$R[204]=(($R[203]+$R[5])*12/$nm)/360;if ($R[204]<0) $R[204]=0;
if (!isset($R[204])) $R[204]='NS';
$R[205]=($p['FS']-$p['FT']+$p['FU']-$p['FV']+$p['FW'])*$tva/100;
if (!isset($R[205])) $R[205]='NS';
@ -249,7 +248,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[206])) $R[206]='NS';
$R[207]=((($p['FS']- $p['FT']+ $p['FU']- $p['FV']+ $p['FW'])+ ($R[206]))*12/$nm)/360;if ($R[207]<0) $R[207]=0;
if (!isset($R[207])) $R[207]='NS';
$R[208]=($R[005]*100)/$p['EE'];
$R[208]=($R[5]*100)/$p['EE'];
if (!isset($R[208])) $R[208]='NS';
$R[209]=$p['HP']+$p['HQ']-$p['GR'];
if (!isset($R[209])) $R[209]='NS';
@ -257,7 +256,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[210])) $R[210]='NS';
$R[211]=($R[210]*100)/$p['EE'];
if (!isset($R[211])) $R[211]='NS';
$R[212]=($R[084]*100)/$p['EE'];
$R[212]=($R[84]*100)/$p['EE'];
if (!isset($R[212])) $R[212]='NS';
$R[213]=$p['BL']-$p['BM'];
if (!isset($R[213])) $R[213]='NS';
@ -279,17 +278,17 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[221])) $R[221]='NS';
$R[222]=($R[221]*100)/$p['EE'];
if (!isset($R[222])) $R[222]='NS';
$R[223]=$R[079]+$R[080]-$R[059];
$R[223]=$R[79]+$R[80]-$R[59];
if (!isset($R[223])) $R[223]='NS';
$R[224]=$p['CJ']-$p['CK']-$p['CH']+$p['CI']-$p['DW']-$p['DX']-$p['DY']-$p['DZ']-$p['EA']-$p['EH'];
if (!isset($R[224])) $R[224]='NS';
$R[225]=$R[060]+$R[061]+$R[062]-$R[084]-$R[085]-$R[086];
$R[225]=$R[60]+$R[61]+$R[62]-$R[84]-$R[85]-$R[86];
if (!isset($R[225])) $R[225]='NS';
$R[226]=$R[223]-$R[225];
if (!isset($R[226])) $R[226]='NS';
$R[227]=$p['YS'];
if (!isset($R[227])) $R[227]='NS';
$R[228]=($R[079]*12)/$nm;
$R[228]=($R[79]*12)/$nm;
if (!isset($R[228])) $R[228]='NS';
$R[229]=$p['FY']+$p['FZ'];
if (!isset($R[229])) $R[229]='NS';
@ -307,47 +306,47 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[235])) $R[235]='NS';
$R[236]=($R[232])*12/$nm;
if (!isset($R[236])) $R[236]='NS';
$R[237]=($R[202]*100)/$R[059];
$R[237]=($R[202]*100)/$R[59];
if (!isset($R[237])) $R[237]='NS';
$R[238]=($R[235]*360)/$R[006];
$R[238]=($R[235]*360)/$R[6];
if (!isset($R[238])) $R[238]='NS';
$R[239]=($R[070]*100)/$p['EC'];
$R[239]=($R[70]*100)/$p['EC'];
if (!isset($R[239])) $R[239]='NS';
$R[240]=($R[070]*100)/abs($R[202]);if ($R[240]<0) $R[240]=0;
$R[240]=($R[70]*100)/abs($R[202]);if ($R[240]<0) $R[240]=0;
if (!isset($R[240])) $R[240]='NS';
$R[241]=($p['EC']/($R[070]))*100;
$R[241]=($p['EC']/($R[70]))*100;
if (!isset($R[241])) $R[241]='NS';
$R[242]=(($p['GR']+$R[152])*100)/$R[140];if ($R[242]<-200) $R[242]=-200;
if (!isset($R[242])) $R[242]='NS';
$R[243]=($R[081]*100)/($R[079]+$R[090]);
$R[243]=($R[81]*100)/($R[79]+$R[90]);
if (!isset($R[243])) $R[243]='NS';
$R[244]=($R[089]*100)/$R[070];
$R[244]=($R[89]*100)/$R[70];
if (!isset($R[244])) $R[244]='NS';
$R[245]=($R[153]*100)/$p['EC'];
if (!isset($R[245])) $R[245]='NS';
$R[246]=($R[153]*100)/$R[140];
if (!isset($R[246])) $R[246]='NS';
$R[247]=($R[080]+$p['YQ']+$p['YR'])/$R[233];
$R[247]=($R[80]+$p['YQ']+$p['YR'])/$R[233];
if (!isset($R[247])) $R[247]='NS';
$R[248]=$R[084]*100/$R[060];
$R[248]=$R[84]*100/$R[60];
if (!isset($R[248])) $R[248]='NS';
$R[249]=$R[231]-$R[232];
if (!isset($R[249])) $R[249]='NS';
$R[250]=($R[063]*100)/$R[088];
$R[250]=($R[63]*100)/$R[88];
if (!isset($R[250])) $R[250]='NS';
$R[251]=(($p['CJ']- $p['CK']- $p['CH']+ $p['CL'])*100/$R[088]);
$R[251]=(($p['CJ']- $p['CK']- $p['CH']+ $p['CL'])*100/$R[88]);
if (!isset($R[251])) $R[251]='NS';
$R[252]=($R[063]+$R[061])*100/$R[088];
$R[252]=($R[63]+$R[61])*100/$R[88];
if (!isset($R[252])) $R[252]='NS';
$R[253]=($p['CJ']-$p['CK']-$p['CH']+$p['CL'])*100/$R[073];
$R[253]=($p['CJ']-$p['CK']-$p['CH']+$p['CL'])*100/$R[73];
if (!isset($R[253])) $R[253]='NS';
$R[254]=$p['AO']+$p['AQ']+$p['AS']+$p['AU']+$p['AW']+$p['AY'];
if (!isset($R[254])) $R[254]='NS';
$R[261]=$R[124]/$R[024];
$R[261]=$R[124]/$R[24];
if (!isset($R[261])) $R[261]='NS';
$R[262]=($R[140]*100/$p['EE']);
if (!isset($R[262])) $R[262]='NS';
$R[263]=($p['HN']*100/$R[070]);
$R[263]=($p['HN']*100/$R[70]);
if (!isset($R[263])) $R[263]='NS';
$R[264]=($p['HN']*100/($p['FL']+ $p['FO']));
if (!isset($R[264])) $R[264]='NS';
@ -355,11 +354,11 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[265])) $R[265]='NS';
$R[266]=($R[233]*100)/$R[130];
if (!isset($R[266])) $R[266]='NS';
$R[267]=$R[006]/$R[024];
$R[267]=$R[6]/$R[24];
if (!isset($R[267])) $R[267]='NS';
$R[268]=($R[140]*100)/($p['FL']+$p['FO']);
if (!isset($R[268])) $R[268]='NS';
$R[269]=($R[130]*100)/($R[051]+$R[052]);
$R[269]=($R[130]*100)/($R[51]+$R[52]);
if (!isset($R[269])) $R[269]='NS';
$R[271]=($p['FL']+$p['FO'])*100/$p['EE'];
if (!isset($R[271])) $R[271]='NS';
@ -391,7 +390,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[284])) $R[284]='NS';
$R[285]=(($p['HK']+$p['FX'])*100)/$R[130];
if (!isset($R[285])) $R[285]='NS';
$R[286]=($R[006])/360;if ($R[286]<0) $R[286]=0;
$R[286]=($R[6])/360;if ($R[286]<0) $R[286]=0;
if (!isset($R[286])) $R[286]='NS';
$R[297]=$R[215]/$R[286];
if (!isset($R[297])) $R[297]='NS';
@ -409,13 +408,13 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[303])) $R[303]='NS';
$R[304]=$p['ZR'];
if (!isset($R[304])) $R[304]='NS';
$R[305]=$R[070]+$R[088]+$R[089]-$R[226];
$R[305]=$R[70]+$R[88]+$R[89]-$R[226];
if (!isset($R[305])) $R[305]='NS';
$R[306]=($R[006]*(100-getInflation(substr($millesime,-4))))/100;
$R[306]=($R[6]*(100-getInflation(substr($millesime,-4))))/100;
if (!isset($R[306])) $R[306]='NS';
$R[307]=($R[140]*100)/$R[130];
if (!isset($R[307])) $R[307]='NS';
$R[308]=(($p['CJ']-$p['CK']-$p['CH']+$p['CL'])/$R[088]);
$R[308]=(($p['CJ']-$p['CK']-$p['CH']+$p['CL'])/$R[88]);
if (!isset($R[308])) $R[308]='NS';
$R[309]=$p['CB'];
if (!isset($R[309])) $R[309]='NS';
@ -425,7 +424,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[311])) $R[311]='NS';
$R[312]=$p['AH'];
if (!isset($R[312])) $R[312]='NS';
$R[313]=$R[010]*100/$p['EE'];
$R[313]=$R[10]*100/$p['EE'];
if (!isset($R[313])) $R[313]='NS';
$R[314]=$R[311]*100/$p['EE'];
if (!isset($R[314])) $R[314]='NS';
@ -449,57 +448,57 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[501])) $R[501]='NS';
$R[502]=($p['CV']+$p['BC'])*100/($p['CS']+$p['CU']);
if (!isset($R[502])) $R[502]='NS';
$R[503]=$R[233]*100/$R[005];
$R[503]=$R[233]*100/$R[5];
if (!isset($R[503])) $R[503]='NS';
$R[504]=((($p['FL']+$p['FM']+$p['FN'])*12)/$nm);if ($R[504]<0) $R[504]=0;
if (!isset($R[504])) $R[504]='NS';
$R[505]=(($R[130]*12)/$nm)*100/$R[006];
$R[505]=(($R[130]*12)/$nm)*100/$R[6];
if (!isset($R[505])) $R[505]='NS';
$R[506]=(($R[140]*12)/$nm)*100/$R[006];
$R[506]=(($R[140]*12)/$nm)*100/$R[6];
if (!isset($R[506])) $R[506]='NS';
$R[507]=($R[017]*100)/$R[006];
$R[507]=($R[17]*100)/$R[6];
if (!isset($R[507])) $R[507]='NS';
$R[508]=(($R[170]*12)/$nm)*100/$R[006];
$R[508]=(($R[170]*12)/$nm)*100/$R[6];
if (!isset($R[508])) $R[508]='NS';
$R[509]=($R[011]*100)/$R[006];
$R[509]=($R[11]*100)/$R[6];
if (!isset($R[509])) $R[509]='NS';
$R[510]=($R[070]*100)/$R[022];
$R[510]=($R[70]*100)/$R[22];
if (!isset($R[510])) $R[510]='NS';
$R[511]=($R[070]+$R[072])*100/($R[079]+$R[090]);
$R[511]=($R[70]+$R[72])*100/($R[79]+$R[90]);
if (!isset($R[511])) $R[511]='NS';
$R[512]=$R[226]/$R[286];
if (!isset($R[512])) $R[512]='NS';
$R[513]=(($p['HN']- $p['HI']- $p['FO']- $p['FP'])*12)/$nm;
if (!isset($R[513])) $R[513]='NS';
$R[514]=($R[513]*100)/$R[006];
$R[514]=($R[513]*100)/$R[6];
if (!isset($R[514])) $R[514]='NS';
$R[515]=($p['HN']-$p['HI']-$p['FO']-$p['FP']);
if (!isset($R[515])) $R[515]='NS';
$R[516]=($R[513]-$R[011])*100/$R[011];
$R[516]=($R[513]-$R[11])*100/$R[11];
if (!isset($R[516])) $R[516]='NS';
$R[517]=($R[233]*100)/($p['BJ']-$p['AN']);
if (!isset($R[517])) $R[517]='NS';
$R[518]=($R[233]*100)/$R[080];
$R[518]=($R[233]*100)/$R[80];
if (!isset($R[518])) $R[518]='NS';
$R[519]=($R[080]*100)/$R[022];
$R[519]=($R[80]*100)/$R[22];
if (!isset($R[519])) $R[519]='NS';
$R[520]=($R[153]*100)/$R[005];
$R[520]=($R[153]*100)/$R[5];
if (!isset($R[520])) $R[520]='NS';
$R[521]=($R[226]+$p['CS']-$p['CT']+$p['CU']-$p['CV']+$p['BB']-$p['BC']+$R[210])/(($R[102]+$R[121]+$R[123]+$R[132]+$R[133]+$R[142])/360);
if (!isset($R[521])) $R[521]='NS';
$R[522]=($R[016]*100)/$R[022];
$R[522]=($R[16]*100)/$R[22];
if (!isset($R[522])) $R[522]='NS';
$R[523]=($R[010]*100)/$R[070];
$R[523]=($R[10]*100)/$R[70];
if (!isset($R[523])) $R[523]='NS';
$R[524]=($R[052]*100)/$R[022];
$R[524]=($R[52]*100)/$R[22];
if (!isset($R[524])) $R[524]='NS';
$R[525]=($R[060]*100)/$R[022];
$R[525]=($R[60]*100)/$R[22];
if (!isset($R[525])) $R[525]='NS';
$R[526]=($R[063]*100)/$R[022];
$R[526]=($R[63]*100)/$R[22];
if (!isset($R[526])) $R[526]='NS';
$R[527]=($R[202]*100)/$R[022];
$R[527]=($R[202]*100)/$R[22];
if (!isset($R[527])) $R[527]='NS';
$R[528]=($R[110]*100)/$R[005];
$R[528]=($R[110]*100)/$R[5];
if (!isset($R[528])) $R[528]='NS';
$R[529]=($p['ZE']*12)/$nm;
if (!isset($R[529])) $R[529]='NS';
@ -507,31 +506,31 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[530])) $R[530]='NS';
$R[531]=(($R[153]+$R[170]+$p['XQ'])*100)/($R[153]+$p['XQ']);
if (!isset($R[531])) $R[531]='NS';
$R[532]=($R[052]*100)/($p['BJ']-$p['AN']);
$R[532]=($R[52]*100)/($p['BJ']-$p['AN']);
if (!isset($R[532])) $R[532]='NS';
$R[533]=($R[053]*100)/$R[022];
$R[533]=($R[53]*100)/$R[22];
if (!isset($R[533])) $R[533]='NS';
$R[534]=($R[001]*100)/$R[005];
$R[534]=($R[1]*100)/$R[5];
if (!isset($R[534])) $R[534]='NS';
$R[535]=($p['ZE']*100)/$R[070];
$R[535]=($p['ZE']*100)/$R[70];
if (!isset($R[535])) $R[535]='NS';
$R[538]=($R[233]*100)/$R[305];
if (!isset($R[538])) $R[538]='NS';
$R[540]=($R[233]*100)/$R[202];
if (!isset($R[540])) $R[540]='NS';
$R[542]=($R[016]*100)/$R[153];
$R[542]=($R[16]*100)/$R[153];
if (!isset($R[542])) $R[542]='NS';
$R[543]=($R[010]*100)/($R[070]+$R[072]);
$R[543]=($R[10]*100)/($R[70]+$R[72]);
if (!isset($R[543])) $R[543]='NS';
$R[544]=(($R[130]*12)/$nm)/$R[024];
$R[544]=(($R[130]*12)/$nm)/$R[24];
if (!isset($R[544])) $R[544]='NS';
$R[545]=$R[515]-$R[010];
$R[545]=$R[515]-$R[10];
if (!isset($R[545])) $R[545]='NS';
$R[546]=$R[022]-$R[231]-$R[202];
$R[546]=$R[22]-$R[231]-$R[202];
if (!isset($R[546])) $R[546]='NS';
$R[547]=$p['CJ']-$p['CK'];
if (!isset($R[547])) $R[547]='NS';
$R[548]=$R[022]-$R[547];
$R[548]=$R[22]-$R[547];
if (!isset($R[548])) $R[548]='NS';
$R[549]=$p['DB'];
if (!isset($R[549])) $R[549]='NS';
@ -543,19 +542,19 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[552])) $R[552]='NS';
$R[553]=$R[145]-$R[144];
if (!isset($R[553])) $R[553]='NS';
$R[554]=($R[051]*100)/$R[022];
$R[554]=($R[51]*100)/$R[22];
if (!isset($R[554])) $R[554]='NS';
$R[555]=($R[151]*100)/$R[053];
$R[555]=($R[151]*100)/$R[53];
if (!isset($R[555])) $R[555]='NS';
$R[556]=($R[062]*100)/$R[022];
$R[556]=($R[62]*100)/$R[22];
if (!isset($R[556])) $R[556]='NS';
$R[558]=$R[547]-$R[063]-$R[060]-$R[223];
$R[558]=$R[547]-$R[63]-$R[60]-$R[223];
if (!isset($R[558])) $R[558]='NS';
$R[559]=abs($R[223]);
if (!isset($R[559])) $R[559]='NS';
$R[560]=abs($R[063]);
$R[560]=abs($R[63]);
if (!isset($R[560])) $R[560]='NS';
$R[561]=$R[005]+$p['FQ']+$p['FO'];
$R[561]=$R[5]+$p['FQ']+$p['FO'];
if (!isset($R[561])) $R[561]='NS';
$R[562]=($p['BX']+$p['BV']-$p['BW'])+($p['YS'])+($p['CN'])+($p['CH']-$p['CI']);
if (!isset($R[562])) $R[562]='NS';
@ -621,13 +620,13 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
if (!isset($R[592])) $R[592]='NS';
$R[593]=$R[573]-$R[580]+$R[590];
if (!isset($R[593])) $R[593]='NS';
$R[594]=($R[022]-$R[059]-$R[223]);
$R[594]=($R[22]-$R[59]-$R[223]);
if (!isset($R[594])) $R[594]='NS';
$R[595]=($R[022]-$R[079]-$R[080]-$R[230]);
$R[595]=($R[22]-$R[79]-$R[80]-$R[230]);
if (!isset($R[595])) $R[595]='NS';
$R[596]=$p['EE']-$R[079]-$R[089]-$R[084];
$R[596]=$p['EE']-$R[79]-$R[89]-$R[84];
if (!isset($R[596])) $R[596]='NS';
$R[597]=$p['EE']-$R[065]-$R[060]-$R[059];
$R[597]=$p['EE']-$R[65]-$R[60]-$R[59];
if (!isset($R[597])) $R[597]='NS';
$R[701]=$p['BP3'];
if (!isset($R[701])) $R[701]='NS';
@ -718,7 +717,7 @@ function calculRatios($tabBilans, $tabIdentite, $accesPartenaire) {
$tabRatios[$numBil]=$R;
$numBil++;
}
}
for($i=0; $i<$numBil; $i++) {
$tabRatios[$i][319]=($tabRatios[$i][318]+$tabRatios[$i+1][318]+$tabRatios[$i+2][318])/3; }

View File

@ -2300,6 +2300,7 @@ class Entreprise extends WsScore
public function getValo($siren, $nic=0, $niveau=2)
{
$this->authenticate();
$this->permission('VALORISATION');
//Initialisation
$accesPartenaire = true;
@ -2309,31 +2310,7 @@ class Entreprise extends WsScore
if (empty($nic)) {
$nic = 0;
}
if (empty($niveau)) {
$niveau = 2;
}
if (empty($plus)) {
$plus = false;
}
if ( !in_array($niveau, array(0,1,2,3,4,5)) ) {
$niveau = 2;
}
$perm = false;
//@todo : Gestion des droits
/*switch($niveau){
case 1: $perms = array('indiscore', 'indiscorep'); break;
case 2: $perms = array('indiscore2', 'indiscore2p'); break;
case 3: $perms = array('indiscore3', 'indiscore3p'); break;
}
foreach($perms as $item){
if ( $this->checkPerm($item) ){
$perm = true;
break;
}
}
if ($perm === false) {
$this->sendError('0902');
}*/
$niveau = 2;
$tabRet = array();
debugLog('I',"IndiScore demandée pour $siren en niveau $niveau",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
@ -2717,7 +2694,7 @@ class Entreprise extends WsScore
$output->RatiosInfos = $tabRatiosInfos;
$output->RatiosSecteur = $tabRatiosSecteurs;
$this->wsLog('valo',$siren);
$this->wsLog('valorisation',$siren);
return $output;
}

View File

@ -78,7 +78,7 @@ class WsScore
'AVISINSEE' => 'Avis de situation INSEE',
//DIRIGEANT
'DIRIGEANTS' => "Liste des dirigeants",
'DIRIGEANTS' => "Liste des dirigeants",
'DIRIGEANTSOP' => "Liste des dirigeants opérationnels",
//FINANCE
@ -104,7 +104,8 @@ class WsScore
'INDISCORE3' => "Rapport complet",
'INDISCOREP' => "indiScore+",
'INDISCORE2P' => "Rapport synthetique+",
'INDISCORE3P' => "Rapport complet+",
'INDISCORE3P' => "Rapport complet+",
'VALORISATION' => "Valorisation",
'SCORECSF' => "Score CSF",
'ENQUETEC' => "Enquête commerciale",
'AVISCREDIT' => "Avis de crédit personnalisé",
@ -134,7 +135,7 @@ class WsScore
//DIVERS
'INTERNATIONAL' => "Recherche Internationale",
'BDF' => "Banque de France",
'WORLDCHECK' => "WORLDCHECK",
'WORLDCHECK' => "World-Check Risk Intelligence",
);
protected $listeCategory = array(
@ -164,7 +165,7 @@ class WsScore
'EVALUATION' => array(
'label' => 'Evaluation',
'droits' => array('INDISCORE', 'INDISCORE2', 'INDISCORE3', 'INDISCOREP', 'INDISCORE2P',
'INDISCORE3P','ENQUETEC','AVISCREDIT'),
'INDISCORE3P','VALORISATION','ENQUETEC','AVISCREDIT'),
),
'PIECES' => array(
'label' => 'Pièces officielles',
@ -297,7 +298,10 @@ class WsScore
'label' => "Arborescence de groupes",
),
'groupeinfos' => array(
'label' => "Informations groupe",
'label' => "Informations groupe",
),
'valorisation' => array(
'label' => "Valorisation",
),
);

View File

@ -46,15 +46,18 @@ if( count($opts->getOptions())==0 || isset($opts->help))
if ( $opts->list ) {
$tabItems = array(
'tribunaux' => "Tribunaux",
'FctDir' => "Fonctions de direction",
'Evenements' => "Table des evenements bodacc",
'Devises' => "Table des devises bodacc",
'RncsTribunaux' => "Table des tribunaux",
'PaysInpi' => "PaysInpi",
'Jugements' => "Jugements",
'CodesNaf' => "Codes Naf",
'CodesNace' => "Codes Nace",
'Tribunaux' => "Tribunaux",
'FctDir' => "Fonctions de direction",
'Evenements' => "Table des evenements bodacc",
'Devises' => "Table des devises bodacc",
'RncsTribunaux' => "Table des tribunaux",
'DevisesInpi' => "Devises Inpi",
'Jugements' => "Jugements",
'PaysInpi' => "PaysInpi",
'CodesNaf' => "Codes Naf",
'CodesNace' => "Codes Nace",
'CodesNafa' => "Codes Nafa",
'CodesFJ' => "Codes Formes Juridiques",
);
echo "\n";
foreach ( $tabItems as $code => $label ) {
@ -64,8 +67,11 @@ if ( $opts->list ) {
exit;
}
if( $opts->generate == 'tribunaux' ) {
/**
* Cache des Tribunaux Bodacc
* Metier / Bodacc / Cache
*/
if( $opts->generate == 'Tribunaux' ) {
$c = new Zend_Config($application->getOptions());
$db = Zend_Db::factory($c->profil->db->metier);
@ -74,7 +80,7 @@ if( $opts->generate == 'tribunaux' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -91,6 +97,10 @@ if( $opts->generate == 'tribunaux' ) {
}
/**
* Cache Fonctions de Direction
* Metier / bodacc / Cache
*/
if ( $opts->generate == 'FctDir' ) {
$c = new Zend_Config($application->getOptions());
@ -100,7 +110,7 @@ if ( $opts->generate == 'FctDir' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheFctDir.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'FctDir.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -113,6 +123,10 @@ if ( $opts->generate == 'FctDir' ) {
}
/**
* Cache Evenements
* Metier / bodacc / Cache
*/
if ( $opts->generate == 'Evenements' ) {
$c = new Zend_Config($application->getOptions());
@ -122,7 +136,7 @@ if ( $opts->generate == 'Evenements' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheEvenements.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Evenements.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -143,6 +157,10 @@ if ( $opts->generate == 'Evenements' ) {
}
/**
* Cache des devises Bodacc
* Metier / bodacc / Cache
*/
if ( $opts->generate == 'Devises' ) {
$c = new Zend_Config($application->getOptions());
@ -152,7 +170,7 @@ if ( $opts->generate == 'Devises' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevises.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Devises.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -165,6 +183,10 @@ if ( $opts->generate == 'Devises' ) {
}
/**
* Cache Tribunaux RNCS
* Metier / Partenaires / Cache
*/
if ( $opts->generate == 'RncsTribunaux' ) {
$c = new Zend_Config($application->getOptions());
@ -174,7 +196,7 @@ if ( $opts->generate == 'RncsTribunaux' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheTribunaux.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -189,6 +211,10 @@ if ( $opts->generate == 'RncsTribunaux' ) {
}
/**
* Cache Devises Inpi
* Metier / Partenaires / Cache
*/
if ( $opts->generate == 'DevisesInpi' ) {
$c = new Zend_Config($application->getOptions());
@ -198,7 +224,7 @@ if ( $opts->generate == 'DevisesInpi' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheDevisesInpi.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'DevisesInpi.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -211,6 +237,10 @@ if ( $opts->generate == 'DevisesInpi' ) {
}
/**
* Cache Jugements
* Metier / Partenaires / Cache
*/
if ( $opts->generate == 'Jugements' ) {
$c = new Zend_Config($application->getOptions());
@ -220,7 +250,7 @@ if ( $opts->generate == 'Jugements' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheJugements.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'Jugements.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -233,6 +263,10 @@ if ( $opts->generate == 'Jugements' ) {
}
/**
* Cache PaysInpi
* Metier / Partenaires / Cache
*/
if ( $opts->generate == 'PaysInpi' ) {
$c = new Zend_Config($application->getOptions());
@ -242,7 +276,7 @@ if ( $opts->generate == 'PaysInpi' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CachePaysInpi.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'PaysInpi.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -255,12 +289,16 @@ if ( $opts->generate == 'PaysInpi' ) {
}
/**
* Cache CodesNaf
* Metier / Insee / Cache
*/
if ( $opts->generate == 'CodesNaf' ) {
$c = new Zend_Config($application->getOptions());
$db = Zend_Db::factory($c->profil->db->metier);
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNaf.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNaf.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -289,6 +327,10 @@ if ( $opts->generate == 'CodesNaf' ) {
}
/**
* Cache CodesNace
* Metier / Insee / Cache
*/
if ( $opts->generate == 'CodesNace' ) {
$c = new Zend_Config($application->getOptions());
@ -298,7 +340,7 @@ if ( $opts->generate == 'CodesNace' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNace.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNace.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -311,6 +353,10 @@ if ( $opts->generate == 'CodesNace' ) {
}
/**
* Cache CodesNafa
* Metier / Insee / Cache
*/
if ( $opts->generate == 'CodesNafa' ) {
$c = new Zend_Config($application->getOptions());
@ -320,7 +366,7 @@ if ( $opts->generate == 'CodesNafa' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesNafa.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNafa.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -333,6 +379,10 @@ if ( $opts->generate == 'CodesNafa' ) {
}
/**
* Cache CodesFJ
* Metier / Insee / Cache
*/
if ( $opts->generate == 'CodesFJ' ) {
$c = new Zend_Config($application->getOptions());
@ -342,7 +392,7 @@ if ( $opts->generate == 'CodesFJ' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'CacheCodesFJ.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesFJ.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");