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,24 +472,26 @@ 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);
|
||||
|
||||
if (count($rep)>0) {
|
||||
$entrep=$rep[0];
|
||||
|
||||
if ($entrep['jourUpdate']<>'0000-00-00') {
|
||||
$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'];
|
||||
}
|
||||
|
||||
$tabIdentite = array(
|
||||
'siren' => $entrep['siren'],
|
||||
'sirenValide' => $entrep['sirenValide'],
|
||||
@ -530,6 +526,7 @@ class Metier_Partenaires_MRncs
|
||||
|
||||
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