Update class Metier

This commit is contained in:
Michael RICOIS 2014-04-22 13:57:12 +00:00
parent dc5cbc9ffe
commit ef774b522e
8 changed files with 9507 additions and 16 deletions

View File

@ -64,6 +64,24 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
//Lecture de la base de données
$sql = $actesM->select()
->from($actesM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'pdfSize',
'pdfPage',
'num_depot',
'date_depot',
'date_acte',
'LPAD(num_acte,2,0) AS num_acte',
'type_acte',
'type_acte_libelle',
'nbpages_acte',
'decision_nature',
'decision_libelle',
'mode_diffusion'
))
->where('siren=?', $this->siren)
->where('actif=1')
->order('date_depot DESC')
@ -81,7 +99,7 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
$item->FileNumberOfPages = $row->pdfPage;
$item->DepotNum = $row->num_depot;
$item->DepotDate = $row->date_depot;
$item->ActeNum = str_pad($row->num_acte, 2, '0', STR_PAD_LEFT);
$item->ActeNum = $row->num_acte;
$item->ActeDate = $row->date_acte;
$item->ActeNumberOfPages = $row->nbpages_acte;
$item->ActeType = $row->type_acte;
@ -129,6 +147,17 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
$actesM = new Application_Model_JoGreffesActes($this->db);
$sql = $actesM->select()
->from($actesM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'num_depot',
'date_depot',
'date_acte',
'LPAD(num_acte,2,0) AS num_acte',
'type_acte',
))
->where('siren=?', $this->siren)
->where('num_depot=?', $depotNum)
->where('date_depot=?', $depotDate)
@ -150,10 +179,13 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
$this->date_depot = $row->date_depot;
$this->num_depot = $row->num_depot;
$this->date_acte = $row->date_acte;
$this->num = str_pad($row->num_acte, 2, '0', STR_PAD_LEFT);
$this->num = $row->num_acte;
//Needed element for filename
$date = $row->date_acte;
if ( $date == '0000-00-00' ) {
$date = $row->date_depot;
}
$type = $row->type_acte;
$num = $row->num_acte;
$options = $row->numGreffe . '-' . substr($row->numRC,0,2) . '-' . substr($row->numRC,2,1) . '-' . substr($row->numRC,3) . '-' . $row->num_depot;
@ -238,6 +270,17 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
//Lire dans la base de données
$actesM = new Application_Model_JoGreffesActes();
$sql = $actesM->select()
->from($actesM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'num_depot',
'date_depot',
'date_acte',
'LPAD(num_acte,2,0) AS num_acte',
'type_acte',
))
->where('siren=?', $this->siren)
->where('num_depot=?', $depotNum)
->where('date_depot=?', $depotDate)
@ -260,7 +303,7 @@ class Metier_Infogreffe_Ac extends Metier_Infogreffe
$this->num_depot = $row->num_depot;
$this->type_acte = $row->type_acte;
$this->date_acte = $row->date_acte;
$this->num = str_pad($row->num_acte, 2, '0', STR_PAD_LEFT);
$this->num = $row->num_acte;
//Faire la requete
try {

View File

@ -72,6 +72,23 @@ class Metier_Infogreffe_Bi extends Metier_Infogreffe
//Lecture de la base de données
$sql = $bilansM->select()
->from($bilansM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'pdfSize',
'pdfPage',
'millesime',
'num_depot',
'date_cloture',
'type_comptes',
'mode_diffusion',
'duree_exercice',
'saisie_date',
'saisie_code',
'pages',
))
->where('siren=?', $this->siren)
->where('actif=1')
->order('date_cloture DESC')
@ -157,6 +174,16 @@ class Metier_Infogreffe_Bi extends Metier_Infogreffe
//Lire dans la base de données
$bilansM = new Application_Model_JoGreffesBilans();
$sql = $bilansM->select()
->from($bilansM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'millesime',
'num_depot',
'date_cloture',
'type_comptes',
))
->where('siren=?', $this->siren)
->where('date_cloture=?', $dateCloture);
if ( $type == 'sociaux' || $type == '' ) {
@ -185,9 +212,6 @@ class Metier_Infogreffe_Bi extends Metier_Infogreffe
if ($row->pdfLink != '') {
//Set filename
$filename = $this->getFilePath($type, $dateCloture) . '/' . $this->getFileName($type, $dateCloture);
//Check if filename exist
if ( !file_exists($this->config->storage->path . '/' . $filename) ) {
throw new Exception('File not found');
@ -259,6 +283,16 @@ class Metier_Infogreffe_Bi extends Metier_Infogreffe
//Lire dans la base de données
$bilansM = new Application_Model_JoGreffesBilans();
$sql = $bilansM->select()
->from($bilansM, array(
'siren',
'numRC',
'LPAD(numGreffe,4,0) AS numGreffe',
'pdfLink',
'millesime',
'num_depot',
'date_cloture',
'type_comptes',
))
->where('siren=?', $this->siren)
->where('date_cloture=?', $dateCloture);
if ($type=='sociaux') {

View File

@ -2399,7 +2399,7 @@ class MInsee
}
$iTel = new MTel(false);
$tmp = $iTel->getTel($siren, $nic);
$tmp = $iTel->getTel($siren, $nic, true, 1);
if($this->debugtime) {
$duree=round(microtime(1)-$tdeb,3);

View File

@ -22,4 +22,5 @@ return array(
2010=>1.5,
2011=>2.1,
2012=>2,
2013=>0.9,
);

View File

@ -71,7 +71,7 @@ return array(
'98' => array('lib'=>"Territoires d'outre-mer", 'art'=>"Territoires d'outre-mer"),
'99' => array('lib'=>"Etranger", 'art'=>"Etranger"),
),
'ZEMET' => array(
'ZEMET1994' => array(
'1131' => array('lib'=>"PARIS", 'art'=>"de PARIS"),
'1132' => array('lib'=>"NANTERRE", 'art'=>"de NANTERRE"),
'1133' => array('lib'=>"BOULOGNE-BILLANCOURT", 'art'=>"de BOULOGNE-BILLANCOURT"),
@ -421,6 +421,330 @@ return array(
'9416' => array('lib'=>"PORTO-VECCHIO", 'art'=>"de PORTO-VECCHIO"),
'9417' => array('lib'=>"SARTENE-PROPRIANO", 'art'=>"de SARTENE-PROPRIANO"),
),
'ZEMET2010' => array(
'50' => array('lib'=>"Mont-de-Marsan", 'art'=>"de Mont-de-Marsan"),
'51' => array('lib'=>"Alençon", 'art'=>"de Alençon"),
'52' => array('lib'=>"Cosne - Clamecy", 'art'=>"de Cosne - Clamecy"),
'53' => array('lib'=>"Mâcon", 'art'=>"de Mâcon"),
'54' => array('lib'=>"Nogent-le-Rotrou", 'art'=>"de Nogent-le-Rotrou"),
'55' => array('lib'=>"Vallée de la Bresle - Vimeu", 'art'=>"de Vallée de la Bresle - Vimeu"),
'56' => array('lib'=>"Roissy - Sud Picardie", 'art'=>"de Roissy - Sud Picardie"),
'57' => array('lib'=>"Brive-la-Gaillarde", 'art'=>"de Brive-la-Gaillarde"),
'59' => array('lib'=>"Avignon", 'art'=>"de Avignon"),
'60' => array('lib'=>"Saint-Étienne", 'art'=>"de Saint-Étienne"),
'61' => array('lib'=>"Toulouse", 'art'=>"de Toulouse"),
'101' => array('lib'=>"Pointe-à-Pitre", 'art'=>"de Pointe-à-Pitre"),
'102' => array('lib'=>"Basse-Terre", 'art'=>"de Basse-Terre"),
'103' => array('lib'=>"Marie-Galante", 'art'=>"de Marie-Galante"),
'106' => array('lib'=>"Est - Grande-Terre", 'art'=>"de Est - Grande-Terre"),
'201' => array('lib'=>"Centre agglomération", 'art'=>"de Centre agglomération"),
'202' => array('lib'=>"Sud-Caraibe", 'art'=>"de Sud-Caraibe"),
'203' => array('lib'=>"Sud", 'art'=>"de Sud"),
'204' => array('lib'=>"Centre-Atlantique", 'art'=>"de Centre-Atlantique"),
'205' => array('lib'=>"Nord-Caraibe", 'art'=>"de Nord-Caraibe"),
'206' => array('lib'=>"Nord-Atlantique", 'art'=>"de Nord-Atlantique"),
'301' => array('lib'=>"Cayenne", 'art'=>"de Cayenne"),
'302' => array('lib'=>"Kourou", 'art'=>"de Kourou"),
'303' => array('lib'=>"Saint-Laurent", 'art'=>"de Saint-Laurent"),
'401' => array('lib'=>"Est", 'art'=>"de Est"),
'402' => array('lib'=>"Nord", 'art'=>"de Nord"),
'403' => array('lib'=>"Ouest", 'art'=>"de Ouest"),
'404' => array('lib'=>"Sud", 'art'=>"de Sud"),
'601' => array('lib'=>"Mayotte", 'art'=>"de Mayotte"),
'1101' => array('lib'=>"Paris", 'art'=>"de Paris"),
'1102' => array('lib'=>"Marne-la-Vallée", 'art'=>"de Marne-la-Vallée"),
'1103' => array('lib'=>"Coulommiers", 'art'=>"de Coulommiers"),
'1104' => array('lib'=>"Meaux", 'art'=>"de Meaux"),
'1105' => array('lib'=>"Melun", 'art'=>"de Melun"),
'1106' => array('lib'=>"Montereau-Fault-Yonne", 'art'=>"de Montereau-Fault-Yonne"),
'1107' => array('lib'=>"Nemours", 'art'=>"de Nemours"),
'1108' => array('lib'=>"Provins", 'art'=>"de Provins"),
'1109' => array('lib'=>"Houdan", 'art'=>"de Houdan"),
'1110' => array('lib'=>"Mantes-la-Jolie", 'art'=>"de Mantes-la-Jolie"),
'1111' => array('lib'=>"Poissy", 'art'=>"de Poissy"),
'1112' => array('lib'=>"Rambouillet", 'art'=>"de Rambouillet"),
'1113' => array('lib'=>"Plaisir", 'art'=>"de Plaisir"),
'1114' => array('lib'=>"Étampes", 'art'=>"de Étampes"),
'1115' => array('lib'=>"Évry", 'art'=>"de Évry"),
'1116' => array('lib'=>"Saclay", 'art'=>"de Saclay"),
'1117' => array('lib'=>"Créteil", 'art'=>"de Créteil"),
'1118' => array('lib'=>"Orly", 'art'=>"de Orly"),
'1119' => array('lib'=>"Cergy", 'art'=>"de Cergy"),
'2101' => array('lib'=>"Charleville-Mézières", 'art'=>"de Charleville-Mézières"),
'2102' => array('lib'=>"Troyes", 'art'=>"de Troyes"),
'2103' => array('lib'=>"Châlons-en-Champagne", 'art'=>"de Châlons-en-Champagne"),
'2104' => array('lib'=>"Épernay", 'art'=>"de Épernay"),
'2105' => array('lib'=>"Reims", 'art'=>"de Reims"),
'2106' => array('lib'=>"Chaumont - Langres", 'art'=>"de Chaumont - Langres"),
'2107' => array('lib'=>"Vitry-le-François - Saint-Dizier", 'art'=>"de Vitry-le-François - Saint-Dizier"),
'2201' => array('lib'=>"Château-Thierry", 'art'=>"de Château-Thierry"),
'2202' => array('lib'=>"Tergnier", 'art'=>"de Tergnier"),
'2203' => array('lib'=>"Thiérache", 'art'=>"de Thiérache"),
'2204' => array('lib'=>"Laon", 'art'=>"de Laon"),
'2205' => array('lib'=>"Saint-Quentin", 'art'=>"de Saint-Quentin"),
'2206' => array('lib'=>"Soissons", 'art'=>"de Soissons"),
'2207' => array('lib'=>"Beauvais", 'art'=>"de Beauvais"),
'2208' => array('lib'=>"Compiègne", 'art'=>"de Compiègne"),
'2209' => array('lib'=>"Abbeville", 'art'=>"de Abbeville"),
'2210' => array('lib'=>"Amiens", 'art'=>"de Amiens"),
'2211' => array('lib'=>"Péronne", 'art'=>"de Péronne"),
'2301' => array('lib'=>"Bernay", 'art'=>"de Bernay"),
'2302' => array('lib'=>"Évreux", 'art'=>"de Évreux"),
'2303' => array('lib'=>"Pont-Audemer", 'art'=>"de Pont-Audemer"),
'2304' => array('lib'=>"Vernon - Gisors", 'art'=>"de Vernon - Gisors"),
'2305' => array('lib'=>"Dieppe - Caux maritime", 'art'=>"de Dieppe - Caux maritime"),
'2306' => array('lib'=>"Le Havre", 'art'=>"de Le Havre"),
'2307' => array('lib'=>"Rouen", 'art'=>"de Rouen"),
'2401' => array('lib'=>"Bourges", 'art'=>"de Bourges"),
'2402' => array('lib'=>"Saint-Amand-Montrond", 'art'=>"de Saint-Amand-Montrond"),
'2403' => array('lib'=>"Vierzon", 'art'=>"de Vierzon"),
'2404' => array('lib'=>"Chartres", 'art'=>"de Chartres"),
'2405' => array('lib'=>"Châteaudun", 'art'=>"de Châteaudun"),
'2406' => array('lib'=>"Dreux", 'art'=>"de Dreux"),
'2407' => array('lib'=>"Le Blanc", 'art'=>"de Le Blanc"),
'2408' => array('lib'=>"Issoudun", 'art'=>"de Issoudun"),
'2409' => array('lib'=>"Châteauroux", 'art'=>"de Châteauroux"),
'2410' => array('lib'=>"Chinon", 'art'=>"de Chinon"),
'2411' => array('lib'=>"Loches", 'art'=>"de Loches"),
'2412' => array('lib'=>"Tours", 'art'=>"de Tours"),
'2413' => array('lib'=>"Blois", 'art'=>"de Blois"),
'2414' => array('lib'=>"Romorantin-Lanthenay", 'art'=>"de Romorantin-Lanthenay"),
'2415' => array('lib'=>"Vendôme", 'art'=>"de Vendôme"),
'2416' => array('lib'=>"Gien", 'art'=>"de Gien"),
'2417' => array('lib'=>"Montargis", 'art'=>"de Montargis"),
'2418' => array('lib'=>"Orléans", 'art'=>"de Orléans"),
'2419' => array('lib'=>"Pithiviers", 'art'=>"de Pithiviers"),
'2501' => array('lib'=>"Bayeux", 'art'=>"de Bayeux"),
'2502' => array('lib'=>"Caen", 'art'=>"de Caen"),
'2503' => array('lib'=>"Honfleur", 'art'=>"de Honfleur"),
'2504' => array('lib'=>"Lisieux", 'art'=>"de Lisieux"),
'2505' => array('lib'=>"Vire", 'art'=>"de Vire"),
'2506' => array('lib'=>"Avranches", 'art'=>"de Avranches"),
'2507' => array('lib'=>"Cherbourg-Octeville", 'art'=>"de Cherbourg-Octeville"),
'2508' => array('lib'=>"Coutances", 'art'=>"de Coutances"),
'2509' => array('lib'=>"Granville", 'art'=>"de Granville"),
'2510' => array('lib'=>"Saint-Lô", 'art'=>"de Saint-Lô"),
'2511' => array('lib'=>"Argentan", 'art'=>"de Argentan"),
'2512' => array('lib'=>"Flers", 'art'=>"de Flers"),
'2513' => array('lib'=>"L'Aigle", 'art'=>"de L'Aigle"),
'2601' => array('lib'=>"Beaune", 'art'=>"de Beaune"),
'2602' => array('lib'=>"Chatillon", 'art'=>"de Chatillon"),
'2603' => array('lib'=>"Dijon", 'art'=>"de Dijon"),
'2604' => array('lib'=>"Montbard", 'art'=>"de Montbard"),
'2605' => array('lib'=>"Morvan", 'art'=>"de Morvan"),
'2606' => array('lib'=>"Nevers", 'art'=>"de Nevers"),
'2607' => array('lib'=>"Autun", 'art'=>"de Autun"),
'2608' => array('lib'=>"Chalon-sur-Saône", 'art'=>"de Chalon-sur-Saône"),
'2609' => array('lib'=>"Louhans", 'art'=>"de Louhans"),
'2610' => array('lib'=>"Le Creusot - Montceau", 'art'=>"de Le Creusot - Montceau"),
'2611' => array('lib'=>"Charolais", 'art'=>"de Charolais"),
'2612' => array('lib'=>"Auxerre", 'art'=>"de Auxerre"),
'2613' => array('lib'=>"Avallon", 'art'=>"de Avallon"),
'2614' => array('lib'=>"Sens", 'art'=>"de Sens"),
'3110' => array('lib'=>"Roubaix - Tourcoing", 'art'=>"de Roubaix - Tourcoing"),
'3111' => array('lib'=>"Lille", 'art'=>"de Lille"),
'3112' => array('lib'=>"Dunkerque", 'art'=>"de Dunkerque"),
'3113' => array('lib'=>"Flandre - Lys", 'art'=>"de Flandre - Lys"),
'3114' => array('lib'=>"Douai", 'art'=>"de Douai"),
'3115' => array('lib'=>"Valenciennes", 'art'=>"de Valenciennes"),
'3116' => array('lib'=>"Cambrai", 'art'=>"de Cambrai"),
'3117' => array('lib'=>"Maubeuge", 'art'=>"de Maubeuge"),
'3121' => array('lib'=>"Arras", 'art'=>"de Arras"),
'3122' => array('lib'=>"Lens - Hénin", 'art'=>"de Lens - Hénin"),
'3123' => array('lib'=>"Béthune - Bruay", 'art'=>"de Béthune - Bruay"),
'3124' => array('lib'=>"Saint-Omer", 'art'=>"de Saint-Omer"),
'3125' => array('lib'=>"Calais", 'art'=>"de Calais"),
'3126' => array('lib'=>"Boulogne-sur-mer", 'art'=>"de Boulogne-sur-mer"),
'3127' => array('lib'=>"Berck - Montreuil", 'art'=>"de Berck - Montreuil"),
'4101' => array('lib'=>"Longwy", 'art'=>"de Longwy"),
'4102' => array('lib'=>"Lunéville", 'art'=>"de Lunéville"),
'4103' => array('lib'=>"Nancy", 'art'=>"de Nancy"),
'4104' => array('lib'=>"Bar-le-Duc", 'art'=>"de Bar-le-Duc"),
'4105' => array('lib'=>"Commercy", 'art'=>"de Commercy"),
'4106' => array('lib'=>"Verdun", 'art'=>"de Verdun"),
'4107' => array('lib'=>"Metz", 'art'=>"de Metz"),
'4108' => array('lib'=>"Forbach", 'art'=>"de Forbach"),
'4109' => array('lib'=>"Sarrebourg", 'art'=>"de Sarrebourg"),
'4110' => array('lib'=>"Sarreguemines", 'art'=>"de Sarreguemines"),
'4111' => array('lib'=>"Thionville", 'art'=>"de Thionville"),
'4112' => array('lib'=>"Épinal", 'art'=>"de Épinal"),
'4113' => array('lib'=>"Remiremont", 'art'=>"de Remiremont"),
'4114' => array('lib'=>"Saint-Dié-des-Vosges", 'art'=>"de Saint-Dié-des-Vosges"),
'4115' => array('lib'=>"Neufchâteau", 'art'=>"de Neufchâteau"),
'4201' => array('lib'=>"Haguenau", 'art'=>"de Haguenau"),
'4202' => array('lib'=>"Molsheim - Obernai", 'art'=>"de Molsheim - Obernai"),
'4203' => array('lib'=>"Saverne", 'art'=>"de Saverne"),
'4204' => array('lib'=>"Sélestat", 'art'=>"de Sélestat"),
'4205' => array('lib'=>"Strasbourg", 'art'=>"de Strasbourg"),
'4206' => array('lib'=>"Wissembourg", 'art'=>"de Wissembourg"),
'4207' => array('lib'=>"Colmar", 'art'=>"de Colmar"),
'4208' => array('lib'=>"Mulhouse", 'art'=>"de Mulhouse"),
'4209' => array('lib'=>"Saint-Louis", 'art'=>"de Saint-Louis"),
'4301' => array('lib'=>"Besançon", 'art'=>"de Besançon"),
'4302' => array('lib'=>"Belfort - Montbéliard - Héricourt", 'art'=>"de Belfort - Montbéliard - Héricourt"),
'4303' => array('lib'=>"Morteau", 'art'=>"de Morteau"),
'4304' => array('lib'=>"Pontarlier", 'art'=>"de Pontarlier"),
'4305' => array('lib'=>"Dole", 'art'=>"de Dole"),
'4306' => array('lib'=>"Lons-le-Saunier", 'art'=>"de Lons-le-Saunier"),
'4307' => array('lib'=>"Saint-Claude", 'art'=>"de Saint-Claude"),
'4308' => array('lib'=>"Gray", 'art'=>"de Gray"),
'4309' => array('lib'=>"Vesoul", 'art'=>"de Vesoul"),
'5201' => array('lib'=>"Ancenis", 'art'=>"de Ancenis"),
'5202' => array('lib'=>"Châteaubriant", 'art'=>"de Châteaubriant"),
'5203' => array('lib'=>"Nantes", 'art'=>"de Nantes"),
'5204' => array('lib'=>"Saint-Nazaire", 'art'=>"de Saint-Nazaire"),
'5205' => array('lib'=>"Angers", 'art'=>"de Angers"),
'5206' => array('lib'=>"Cholet", 'art'=>"de Cholet"),
'5207' => array('lib'=>"Saumur", 'art'=>"de Saumur"),
'5208' => array('lib'=>"Segré", 'art'=>"de Segré"),
'5209' => array('lib'=>"Laval", 'art'=>"de Laval"),
'5210' => array('lib'=>"Mayenne", 'art'=>"de Mayenne"),
'5211' => array('lib'=>"La Ferté-Bernard", 'art'=>"de La Ferté-Bernard"),
'5212' => array('lib'=>"La Flèche", 'art'=>"de La Flèche"),
'5213' => array('lib'=>"Le Mans", 'art'=>"de Le Mans"),
'5214' => array('lib'=>"Sablé-sur-Sarthe", 'art'=>"de Sablé-sur-Sarthe"),
'5215' => array('lib'=>"Challans", 'art'=>"de Challans"),
'5216' => array('lib'=>"Fontenay-le-Comte", 'art'=>"de Fontenay-le-Comte"),
'5217' => array('lib'=>"Les Herbiers", 'art'=>"de Les Herbiers"),
'5218' => array('lib'=>"La Roche-sur-Yon", 'art'=>"de La Roche-sur-Yon"),
'5219' => array('lib'=>"Les Sables-d'Olonne", 'art'=>"de Les Sables-d'Olonne"),
'5301' => array('lib'=>"Dinan", 'art'=>"de Dinan"),
'5302' => array('lib'=>"Guingamp", 'art'=>"de Guingamp"),
'5303' => array('lib'=>"Lannion", 'art'=>"de Lannion"),
'5304' => array('lib'=>"Loudéac", 'art'=>"de Loudéac"),
'5305' => array('lib'=>"Saint-Brieuc", 'art'=>"de Saint-Brieuc"),
'5306' => array('lib'=>"Brest", 'art'=>"de Brest"),
'5307' => array('lib'=>"Carhaix-Plouguer", 'art'=>"de Carhaix-Plouguer"),
'5308' => array('lib'=>"Morlaix", 'art'=>"de Morlaix"),
'5309' => array('lib'=>"Quimper", 'art'=>"de Quimper"),
'5310' => array('lib'=>"Fougères", 'art'=>"de Fougères"),
'5311' => array('lib'=>"Redon", 'art'=>"de Redon"),
'5312' => array('lib'=>"Rennes", 'art'=>"de Rennes"),
'5313' => array('lib'=>"Saint-Malo", 'art'=>"de Saint-Malo"),
'5314' => array('lib'=>"Vitré", 'art'=>"de Vitré"),
'5315' => array('lib'=>"Lorient", 'art'=>"de Lorient"),
'5316' => array('lib'=>"Ploërmel", 'art'=>"de Ploërmel"),
'5317' => array('lib'=>"Pontivy", 'art'=>"de Pontivy"),
'5318' => array('lib'=>"Vannes", 'art'=>"de Vannes"),
'5401' => array('lib'=>"Thouars - Loudun", 'art'=>"de Thouars - Loudun"),
'5402' => array('lib'=>"Châtellerault", 'art'=>"de Châtellerault"),
'5403' => array('lib'=>"Angoulême", 'art'=>"de Angoulême"),
'5404' => array('lib'=>"Jonzac - Barbezieux-Saint-Hilaire", 'art'=>"de Jonzac - Barbezieux-Saint-Hilaire"),
'5405' => array('lib'=>"Cognac", 'art'=>"de Cognac"),
'5406' => array('lib'=>"Saintes - Saint-Jean-d'Angély", 'art'=>"de Saintes - Saint-Jean-d'Angély"),
'5407' => array('lib'=>"Royan", 'art'=>"de Royan"),
'5408' => array('lib'=>"Rochefort", 'art'=>"de Rochefort"),
'5409' => array('lib'=>"La Rochelle", 'art'=>"de La Rochelle"),
'5410' => array('lib'=>"Niort", 'art'=>"de Niort"),
'5411' => array('lib'=>"Parthenay", 'art'=>"de Parthenay"),
'5412' => array('lib'=>"Bressuire", 'art'=>"de Bressuire"),
'5413' => array('lib'=>"Poitiers", 'art'=>"de Poitiers"),
'7201' => array('lib'=>"Bergerac", 'art'=>"de Bergerac"),
'7202' => array('lib'=>"Périgueux", 'art'=>"de Périgueux"),
'7203' => array('lib'=>"Sarlat-la-Canéda", 'art'=>"de Sarlat-la-Canéda"),
'7204' => array('lib'=>"Bordeaux", 'art'=>"de Bordeaux"),
'7205' => array('lib'=>"Libourne", 'art'=>"de Libourne"),
'7206' => array('lib'=>"Pauillac", 'art'=>"de Pauillac"),
'7207' => array('lib'=>"La Teste-de-Buch", 'art'=>"de La Teste-de-Buch"),
'7208' => array('lib'=>"Dax", 'art'=>"de Dax"),
'7209' => array('lib'=>"Agen", 'art'=>"de Agen"),
'7210' => array('lib'=>"Marmande", 'art'=>"de Marmande"),
'7211' => array('lib'=>"Villeneuve-sur-Lot", 'art'=>"de Villeneuve-sur-Lot"),
'7212' => array('lib'=>"Bayonne", 'art'=>"de Bayonne"),
'7213' => array('lib'=>"Oloron-Sainte-Marie", 'art'=>"de Oloron-Sainte-Marie"),
'7214' => array('lib'=>"Pau", 'art'=>"de Pau"),
'7301' => array('lib'=>"Foix - Pamiers", 'art'=>"de Foix - Pamiers"),
'7302' => array('lib'=>"Saint-Girons", 'art'=>"de Saint-Girons"),
'7303' => array('lib'=>"Millau", 'art'=>"de Millau"),
'7304' => array('lib'=>"Rodez", 'art'=>"de Rodez"),
'7305' => array('lib'=>"Villefranche-de-Rouergue", 'art'=>"de Villefranche-de-Rouergue"),
'7306' => array('lib'=>"Saint-Gaudens", 'art'=>"de Saint-Gaudens"),
'7307' => array('lib'=>"Auch", 'art'=>"de Auch"),
'7308' => array('lib'=>"Cahors", 'art'=>"de Cahors"),
'7309' => array('lib'=>"Figeac", 'art'=>"de Figeac"),
'7310' => array('lib'=>"Tarbes - Lourdes", 'art'=>"de Tarbes - Lourdes"),
'7311' => array('lib'=>"Albi", 'art'=>"de Albi"),
'7312' => array('lib'=>"Castres - Mazamet", 'art'=>"de Castres - Mazamet"),
'7313' => array('lib'=>"Montauban", 'art'=>"de Montauban"),
'7401' => array('lib'=>"Tulle", 'art'=>"de Tulle"),
'7402' => array('lib'=>"Ussel", 'art'=>"de Ussel"),
'7403' => array('lib'=>"Guéret", 'art'=>"de Guéret"),
'7404' => array('lib'=>"Limoges", 'art'=>"de Limoges"),
'8201' => array('lib'=>"Ambérieu-en-Bugey", 'art'=>"de Ambérieu-en-Bugey"),
'8202' => array('lib'=>"Bourg-en-Bresse", 'art'=>"de Bourg-en-Bresse"),
'8203' => array('lib'=>"Oyonnax", 'art'=>"de Oyonnax"),
'8204' => array('lib'=>"Annonay", 'art'=>"de Annonay"),
'8205' => array('lib'=>"Aubenas", 'art'=>"de Aubenas"),
'8206' => array('lib'=>"Montélimar", 'art'=>"de Montélimar"),
'8207' => array('lib'=>"Romans-sur-Isère", 'art'=>"de Romans-sur-Isère"),
'8208' => array('lib'=>"Valence", 'art'=>"de Valence"),
'8209' => array('lib'=>"Bourgoin-Jallieu", 'art'=>"de Bourgoin-Jallieu"),
'8210' => array('lib'=>"Grenoble", 'art'=>"de Grenoble"),
'8211' => array('lib'=>"Vienne - Roussillon", 'art'=>"de Vienne - Roussillon"),
'8212' => array('lib'=>"Roanne", 'art'=>"de Roanne"),
'8213' => array('lib'=>"Villefranche-sur-Saône", 'art'=>"de Villefranche-sur-Saône"),
'8214' => array('lib'=>"Lyon", 'art'=>"de Lyon"),
'8215' => array('lib'=>"Tarentaise", 'art'=>"de Tarentaise"),
'8216' => array('lib'=>"Chambéry", 'art'=>"de Chambéry"),
'8217' => array('lib'=>"Maurienne", 'art'=>"de Maurienne"),
'8218' => array('lib'=>"Annecy", 'art'=>"de Annecy"),
'8219' => array('lib'=>"Genevois Français", 'art'=>"de Genevois Français"),
'8220' => array('lib'=>"Vallée de l'Arve", 'art'=>"de Vallée de l'Arve"),
'8221' => array('lib'=>"Mont Blanc", 'art'=>"de Mont Blanc"),
'8222' => array('lib'=>"Chablais", 'art'=>"de Chablais"),
'8301' => array('lib'=>"Montluçon", 'art'=>"de Montluçon"),
'8302' => array('lib'=>"Moulins", 'art'=>"de Moulins"),
'8303' => array('lib'=>"Vichy", 'art'=>"de Vichy"),
'8304' => array('lib'=>"Aurillac", 'art'=>"de Aurillac"),
'8305' => array('lib'=>"Mauriac", 'art'=>"de Mauriac"),
'8306' => array('lib'=>"Saint-Flour", 'art'=>"de Saint-Flour"),
'8307' => array('lib'=>"Brioude", 'art'=>"de Brioude"),
'8308' => array('lib'=>"Le Puy-en-Velay", 'art'=>"de Le Puy-en-Velay"),
'8309' => array('lib'=>"Ambert", 'art'=>"de Ambert"),
'8310' => array('lib'=>"Clermont-Ferrand", 'art'=>"de Clermont-Ferrand"),
'8311' => array('lib'=>"Issoire", 'art'=>"de Issoire"),
'8312' => array('lib'=>"Thiers", 'art'=>"de Thiers"),
'9101' => array('lib'=>"Carcassonne", 'art'=>"de Carcassonne"),
'9102' => array('lib'=>"Limoux", 'art'=>"de Limoux"),
'9103' => array('lib'=>"Narbonne", 'art'=>"de Narbonne"),
'9104' => array('lib'=>"Alès", 'art'=>"de Alès"),
'9105' => array('lib'=>"Bagnols-sur-Cèze", 'art'=>"de Bagnols-sur-Cèze"),
'9106' => array('lib'=>"Nîmes", 'art'=>"de Nîmes"),
'9107' => array('lib'=>"Agde - Pézenas", 'art'=>"de Agde - Pézenas"),
'9108' => array('lib'=>"Béziers", 'art'=>"de Béziers"),
'9109' => array('lib'=>"Clermont-l'Hérault - Lodève", 'art'=>"de Clermont-l'Hérault - Lodève"),
'9110' => array('lib'=>"Ganges", 'art'=>"de Ganges"),
'9111' => array('lib'=>"Montpellier", 'art'=>"de Montpellier"),
'9112' => array('lib'=>"Sète", 'art'=>"de Sète"),
'9113' => array('lib'=>"Lozère", 'art'=>"de Lozère"),
'9114' => array('lib'=>"Céret", 'art'=>"de Céret"),
'9115' => array('lib'=>"Perpignan", 'art'=>"de Perpignan"),
'9116' => array('lib'=>"Prades", 'art'=>"de Prades"),
'9301' => array('lib'=>"Digne-les-Bains", 'art'=>"de Digne-les-Bains"),
'9302' => array('lib'=>"Manosque", 'art'=>"de Manosque"),
'9303' => array('lib'=>"Briançon", 'art'=>"de Briançon"),
'9304' => array('lib'=>"Gap", 'art'=>"de Gap"),
'9305' => array('lib'=>"Cannes - Antibes", 'art'=>"de Cannes - Antibes"),
'9306' => array('lib'=>"Menton - Vallée de la Roya", 'art'=>"de Menton - Vallée de la Roya"),
'9307' => array('lib'=>"Nice", 'art'=>"de Nice"),
'9308' => array('lib'=>"Aix-en-Provence", 'art'=>"de Aix-en-Provence"),
'9309' => array('lib'=>"Arles", 'art'=>"de Arles"),
'9310' => array('lib'=>"Marseille - Aubagne", 'art'=>"de Marseille - Aubagne"),
'9311' => array('lib'=>"Istres - Martigues", 'art'=>"de Istres - Martigues"),
'9312' => array('lib'=>"Salon-de-Provence", 'art'=>"de Salon-de-Provence"),
'9313' => array('lib'=>"Draguignan", 'art'=>"de Draguignan"),
'9314' => array('lib'=>"Fréjus - Saint-Raphaël", 'art'=>"de Fréjus - Saint-Raphaël"),
'9315' => array('lib'=>"Toulon", 'art'=>"de Toulon"),
'9316' => array('lib'=>"Cavaillon - Apt", 'art'=>"de Cavaillon - Apt"),
'9317' => array('lib'=>"Orange", 'art'=>"de Orange"),
'9401' => array('lib'=>"Ajaccio", 'art'=>"de Ajaccio"),
'9402' => array('lib'=>"Porto-Vecchio", 'art'=>"de Porto-Vecchio"),
'9403' => array('lib'=>"Sartène - Propriano", 'art'=>"de Sartène - Propriano"),
'9404' => array('lib'=>"Bastia", 'art'=>"de Bastia"),
'9405' => array('lib'=>"Calvi - L'Île-Rousse", 'art'=>"de Calvi - L'Île-Rousse"),
'9406' => array('lib'=>"Corte", 'art'=>"de Corte"),
'9407' => array('lib'=>"Ghisonaccia - Aléria", 'art'=>"de Ghisonaccia - Aléria"),
),
'DEPSIE' => array(
'03' => array('lib'=>"Allier", 'art'=>"Allier"),
'04' => array('lib'=>"Alpes-de-Haute-Provence", 'art'=>"Alpes-de-Haute-Provence"),

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -256,11 +256,18 @@ function formatValeur($variable, $longeur=0, $fonction='')
return $variable;
} else {
if ($nomVar=='ZEMET') {
global $RPEN;
if (isset($tabVariables['ZEMET'][$RPEN.$ZEMET]['art']))
return $tabVariables['ZEMET'][$RPEN.$ZEMET]['art'];
else
return $tabVariables['ZEMET'][$RPEN.$ZEMET]['lib'];
global $RPET, $DateNotice80;
if ( substr($DateNotice80,0,4)>=2010 ) {
$tableZemet = 'ZEMET2010';
} else {
$tableZemet = 'ZEMET1994';
}
if (isset($tabVariables[$tableZemet][$RPET.$ZEMET]['art'])) {
return $tabVariables[$tableZemet][$RPET.$ZEMET]['art'];
} else {
return $tabVariables[$tableZemet][$RPET.$ZEMET]['lib'];
}
}
// Cette variable a un libellé associé
$strTmp=eval("return $valeur;");
@ -639,7 +646,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
$tabCommentaires = $tabTri = $tabTriAff = array();
switch( $type ) {
case 'scores':
$version = '411';
$version = '414';
require_once 'Metier/scores/Variables/CommentsIndiscore'.$version.'.php';
break;
case 'valo':
@ -841,9 +848,11 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
$tabIden80=$iInsee->getInfosNotice($siren,$NIC);
$timer['getInfosNotice'] = microtime(true);
$RECME=$tabIden80['insRECME'];
$ZEMET=$tabIden80['insZEMET'];
$depcomen=$tabIden80['insDEPCOMEN']*1;
$ZEMET=$tabIden80['insZEMET'];
$REPET=$tabIden80['insRPET'];
$RPEN=$tabIden80['insRPEN'];
$DateNotice80=$tabIden80['dateNotice'];
$depcomen=$tabIden80['insDEPCOMEN']*1;
$TU=$tabIden80['insTU'];
/**