Entreprise - getAvisRncs : remove Zend_Db et Application_Model
This commit is contained in:
parent
9e92c2d37f
commit
7dc7ff1448
@ -290,8 +290,6 @@ class Entreprise extends Scores_Ws_Server
|
||||
$this->sendError('1020');
|
||||
}
|
||||
|
||||
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
|
||||
|
||||
$output = new AvisRncs();
|
||||
$rncs = new Metier_Partenaires_MRncs();
|
||||
|
||||
@ -342,17 +340,22 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
//Date du dernier bilan - MOIS/JOUR au pire chercher dans l'annonce
|
||||
try {
|
||||
$bilanM = new Application_Model_JoBilans();
|
||||
$sql = $bilanM->select(true)
|
||||
->columns(array('dateExercice'))
|
||||
->where('siren=?', $siren)
|
||||
->order('dateExercice DESC')->limit(1);
|
||||
$result = $bilanM->fetchRow($sql);
|
||||
if ($result !== null) {
|
||||
$output->CompteArretMois = substr($result->dateExercice,4,2);
|
||||
$output->CompteArretJour = substr($result->dateExercice,6,2);
|
||||
}
|
||||
} catch(Zend_Db_Exception $e) {}
|
||||
$sql = "SELECT dateExercice FROM jo.bilans WHERE siren=:siren
|
||||
ORDER BY dateExercice LIMIT 0,1";
|
||||
$stmt = $this->conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
$stmt->execute();
|
||||
if ($stmt->rowCount() > 0) {
|
||||
$result = $stmt->fetch(\PDO::FETCH_OBJ);
|
||||
$output->CompteArretMois = substr($result->dateExercice,4,2);
|
||||
$output->CompteArretJour = substr($result->dateExercice,6,2);
|
||||
}
|
||||
} catch(\Doctrine\DBAL\DBALException $e) {
|
||||
if ($this->logger !== null) {
|
||||
$this->logger->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=> Avec l'adresse du premier siège
|
||||
$output->ConstitutionTribunalCode = '';
|
||||
@ -361,8 +364,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
$iInsee = new Metier_Insee_MInsee();
|
||||
$dirs = $iInsee->getDirigeants($siren, false);
|
||||
$liste = array();
|
||||
foreach ($dirs as $nb => $dir)
|
||||
{
|
||||
foreach ($dirs as $nb => $dir) {
|
||||
$dirigeant = new AvisRncsAdmin();
|
||||
|
||||
$dirigeant->Code = $dir['Fonction'];
|
||||
|
Loading…
Reference in New Issue
Block a user