issue #0001549 : N'affiche pas de tiers lorsque pas du BODACC
This commit is contained in:
parent
1496e7bbbd
commit
8ae96edb27
@ -1645,35 +1645,36 @@ class Entreprise extends WsScore
|
||||
|
||||
if (is_array($anns))
|
||||
{
|
||||
foreach ($anns as $nb => $ann)
|
||||
{
|
||||
foreach ($anns as $nb => $ann) {
|
||||
if ($isList===true && $nb<$position) { continue; }
|
||||
$cpt++;
|
||||
if ($isList===true && $cpt>$nbRep) { break; }
|
||||
|
||||
//@todo : Entites
|
||||
$entites = array();
|
||||
$detailM = new Application_Model_JoBodaccDetail();
|
||||
$sql = $detailM->select()->from($detailM, array(
|
||||
'LPAD(siren, 9, 000000000) AS siren',
|
||||
'LPAD(nic, 5, 00000) AS nic',
|
||||
'raisonSociale','adresse', 'codePostal', 'ville', 'typeEven')
|
||||
)->where('id=?', $ann['id']);
|
||||
$result = $detailM->fetchAll($sql);
|
||||
if (count($result)>1) {
|
||||
foreach ($result as $entity) {
|
||||
$entite = new AnnonceEntite();
|
||||
$entite->siret = $entity->siren.$entity->nic;
|
||||
$entite->raisonSociale = $entity->raisonSociale;
|
||||
if (in_array($ann['BodaccCode'], array('BODA', 'BODB', 'BODC'))) {
|
||||
$detailM = new Application_Model_JoBodaccDetail();
|
||||
$sql = $detailM->select()->from($detailM, array(
|
||||
'LPAD(siren, 9, 000000000) AS siren',
|
||||
'LPAD(nic, 5, 00000) AS nic',
|
||||
'raisonSociale','adresse', 'codePostal', 'ville', 'typeEven')
|
||||
)->where('id=?', $ann['id']);
|
||||
$result = $detailM->fetchAll($sql);
|
||||
if (count($result)>1) {
|
||||
foreach ($result as $entity) {
|
||||
$entite = new AnnonceEntite();
|
||||
$entite->siret = $entity->siren.$entity->nic;
|
||||
$entite->raisonSociale = $entity->raisonSociale;
|
||||
|
||||
$iBodacc = new MBodacc();
|
||||
$even = new AnnonceEvenement();
|
||||
$even->CodeEven = $entity->typeEven;
|
||||
$even->LibEven = $iBodacc->getEvenement($entity->typeEven);
|
||||
$iBodacc = new MBodacc();
|
||||
$even = new AnnonceEvenement();
|
||||
$even->CodeEven = $entity->typeEven;
|
||||
$even->LibEven = $iBodacc->getEvenement($entity->typeEven);
|
||||
|
||||
$entite->event = $even;
|
||||
$entites[] = $entite;
|
||||
}
|
||||
$entite->event = $even;
|
||||
$entites[] = $entite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//List events
|
||||
|
Loading…
x
Reference in New Issue
Block a user