Insee : Correction

This commit is contained in:
Michael RICOIS 2015-03-02 08:23:55 +00:00
parent cf67448f74
commit 3712a5d0dd

View File

@ -1837,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);
@ -1871,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);
@ -3082,7 +3082,7 @@ class MInsee
}
if ($tabRet['CapitalDev']<>'' && $tabRet['CapitalDev']<>'EUR') {
$dev=$tabRet['CapitalDev'];
$devise=$this->iDb->select('sdv1.devise_liste l, devise_cours c', 'c.devise, c.valeur, c.date, l.devNom, l.devNomPays, l.devPaysIso', "c.devise='$dev' and l.devIso='$dev' ORDER BY c.date DESC LIMIT 0,1", false, MYSQL_ASSOC);
$devise=$this->iDb->select('sdv1.devise_liste l, sdv1.devise_cours c', 'c.devise, c.valeur, c.date, l.devNom, l.devNomPays, l.devPaysIso', "c.devise='$dev' and l.devIso='$dev' ORDER BY c.date DESC LIMIT 0,1", false, MYSQL_ASSOC);
$dev=@$devise[0];
//die(print_r($dev));
$devise=$tabRet['Capital']*$dev['valeur']*1;