MRncs : Suppression old ref
This commit is contained in:
parent
44a554b1d0
commit
2b2e3ce7c8
@ -41,7 +41,6 @@ class Metier_Partenaires_MRncs
|
||||
public $tabTribunaux = array();
|
||||
public $tabMandataires = array();
|
||||
public $tabJugements = array();
|
||||
private $iDb;
|
||||
|
||||
/** Partie Extranet IMR Infogreffe **/
|
||||
public $body='';
|
||||
@ -73,11 +72,6 @@ class Metier_Partenaires_MRncs
|
||||
{
|
||||
$this->conn = Zend_Registry::get('doctrine');
|
||||
|
||||
if ($db === null) {
|
||||
$this->iDb = new Metier_Util_Db();
|
||||
} else {
|
||||
$this->iDb = $db;
|
||||
}
|
||||
$this->tabDevises = $this->getTabDevisesInpi();
|
||||
$this->tabPays = $this->getTabPaysInpi();
|
||||
$this->tabTribunaux = $this->getTabTribunaux();
|
||||
@ -478,58 +472,61 @@ class Metier_Partenaires_MRncs
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param unknown $siren
|
||||
* @return multitype:number unknown mixed string Ambigous Ambigous <>
|
||||
* InfosEntrep
|
||||
* @param string $siren
|
||||
* @return array
|
||||
*/
|
||||
public function getInfosEntrep($siren)
|
||||
{
|
||||
$siren=$siren*1;
|
||||
$rep = $this->iDb->select('jo.rncs_entrep', 'siren, sirenValide, actif, numGreffe, triCode, triId, numRC, numRC2, raisonSociale, nom, prenom, nomUsage, sigle, dateNaiss, lieuNaiss, sexe, nationalite, pays, naf, cj, capitalMontant, capitalDevise, capitalDevIso, dateImma, dateRad, capitalType, capitalCent, provisoires, flux, DATE(dateUpdate) AS jourUpdate', "siren=$siren", false, MYSQL_ASSOC);
|
||||
$siren = $siren*1;
|
||||
|
||||
if (count($rep)>0) {
|
||||
$entrep=$rep[0];
|
||||
|
||||
if ($entrep['jourUpdate']<>'0000-00-00') {
|
||||
$dateMaj=$entrep['jourUpdate'];
|
||||
$sql = "SELECT siren, sirenValide, actif, numGreffe, triCode, triId, numRC, numRC2, raisonSociale, nom, prenom, nomUsage, sigle, dateNaiss, lieuNaiss, sexe, nationalite, pays, naf, cj, capitalMontant, capitalDevise, capitalDevIso, dateImma, dateRad, capitalType, capitalCent, provisoires, flux, DATE(dateUpdate) AS jourUpdate
|
||||
FROM jo.rncs_entrep WHERE siren=:siren";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
$stmt->execute();
|
||||
if ($stmt->rowCount() > 0) {
|
||||
$entrep = $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
if ($entrep['jourUpdate'] != '0000-00-00') {
|
||||
$dateMaj = $entrep['jourUpdate'];
|
||||
} else {
|
||||
$dateMaj=$entrep['flux'];
|
||||
$dateMaj = $entrep['flux'];
|
||||
}
|
||||
|
||||
$tabIdentite = array(
|
||||
'siren' => $entrep['siren'],
|
||||
'sirenValide' => $entrep['sirenValide'],
|
||||
'actif' => $entrep['actif'],
|
||||
'actifEn' => $entrep['actif'],
|
||||
'numGreffe' => $entrep['numGreffe'],
|
||||
'triCode' => $entrep['triCode'],
|
||||
'triId' => $entrep['triId'],
|
||||
'libGreffe' => preg_replace('/^(TC |TGI |TGIcc |TMX |Tribunal Inconnu)/Ui', '', $this->getLibTribunal($entrep['numGreffe']*1)),
|
||||
'numRC' => $entrep['numRC2'],
|
||||
'raisonSociale' => strtoupper($entrep['raisonSociale']),
|
||||
'nom' => strtoupper($entrep['nom']),
|
||||
'siren' => $entrep['siren'],
|
||||
'sirenValide' => $entrep['sirenValide'],
|
||||
'actif' => $entrep['actif'],
|
||||
'actifEn' => $entrep['actif'],
|
||||
'numGreffe' => $entrep['numGreffe'],
|
||||
'triCode' => $entrep['triCode'],
|
||||
'triId' => $entrep['triId'],
|
||||
'libGreffe' => preg_replace('/^(TC |TGI |TGIcc |TMX |Tribunal Inconnu)/Ui', '', $this->getLibTribunal($entrep['numGreffe']*1)),
|
||||
'numRC' => $entrep['numRC2'],
|
||||
'raisonSociale' => strtoupper($entrep['raisonSociale']),
|
||||
'nom' => strtoupper($entrep['nom']),
|
||||
'prenom' => strtoupper($entrep['prenom']),
|
||||
'nomUsage' => strtoupper($entrep['nomUsage']),
|
||||
'sigle' => strtoupper($entrep['sigle']),
|
||||
'dateNaiss' => $entrep['dateNaiss'],
|
||||
'lieuNaiss' => strtoupper($entrep['lieuNaiss']),
|
||||
'sexe' => $entrep['sexe'],
|
||||
'pays' => $entrep['pays'],
|
||||
'nomUsage' => strtoupper($entrep['nomUsage']),
|
||||
'sigle' => strtoupper($entrep['sigle']),
|
||||
'dateNaiss' => $entrep['dateNaiss'],
|
||||
'lieuNaiss' => strtoupper($entrep['lieuNaiss']),
|
||||
'sexe' => $entrep['sexe'],
|
||||
'pays' => $entrep['pays'],
|
||||
'cj' => $entrep['cj'],
|
||||
'cjLib' => $this->getLibelleFJ($entrep['cj']),
|
||||
'cjLib' => $this->getLibelleFJ($entrep['cj']),
|
||||
'nafEnt' => $entrep['naf'],
|
||||
'nafEntLib' => $this->getLibelleNaf($entrep['naf']),
|
||||
'capital' => $entrep['capitalMontant']+($entrep['capitalCent']/100),
|
||||
'nafEntLib' => $this->getLibelleNaf($entrep['naf']),
|
||||
'capital' => $entrep['capitalMontant']+($entrep['capitalCent']/100),
|
||||
'capitalDev' => $entrep['capitalDevIso'],
|
||||
'capitalType' => $entrep['capitalType'],
|
||||
'dateImma' => $entrep['dateImma'],
|
||||
'dateRad' => $entrep['dateRad'],
|
||||
'provisoires' => $entrep['provisoires'],
|
||||
'capitalType' => $entrep['capitalType'],
|
||||
'dateImma' => $entrep['dateImma'],
|
||||
'dateRad' => $entrep['dateRad'],
|
||||
'provisoires' => $entrep['provisoires'],
|
||||
'dateMajEnt' => $dateMaj,
|
||||
);
|
||||
|
||||
return $tabIdentite;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1005,7 +1002,7 @@ class Metier_Partenaires_MRncs
|
||||
if ($origineDemande<>'') {
|
||||
$tabInsert['origineDemande']=$origineDemande;
|
||||
}
|
||||
$this->iDb->insert('jo.rncs_demandes', $tabInsert, false);
|
||||
$this->conn->insert('jo.rncs_demandes', $tabInsert);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1056,7 +1053,7 @@ class Metier_Partenaires_MRncs
|
||||
if ($origineDemande<>'') {
|
||||
$tabInsert['origineDemande']=$origineDemande;
|
||||
}
|
||||
$this->iDb->insert('jo.rncs_demandes', $tabInsert, false);
|
||||
$this->conn->insert('jo.rncs_demandes', $tabInsert);
|
||||
|
||||
// Une erreur ?
|
||||
if ($this->infoIMR['validation-erreur']<>'') {
|
||||
|
Loading…
Reference in New Issue
Block a user