issue #0001564 : Correction conséquence etablissement étranger
This commit is contained in:
parent
2921643f46
commit
414d65c37e
@ -27,7 +27,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$p = $request->getParam('p', 1);
|
||||
$this->view->assign('p', $p);
|
||||
|
||||
$idAnn = $request->getParam('idAnn', 0);
|
||||
$idAnn = $request->getParam('idAnn', null);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
|
||||
$source = $request->getParam('source');
|
||||
@ -45,170 +45,173 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$vue = 'asso';
|
||||
}
|
||||
|
||||
$this->view->assign('vue', $vue);
|
||||
if ($session->getSource()!='006') {
|
||||
|
||||
$nbAnnonces = 20;
|
||||
$position = ($p-1)*$nbAnnonces;
|
||||
$this->view->assign('vue', $vue);
|
||||
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
Zend_Registry::get('firebug')->info('Source:'.$idAnn);
|
||||
}
|
||||
$nbAnnonces = 20;
|
||||
$position = ($p-1)*$nbAnnonces;
|
||||
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'asso':
|
||||
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
|
||||
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAnnonces);
|
||||
} elseif (intval($siren)!=0) {
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
} else {
|
||||
$idAnn = $session->getSourceId();
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
}
|
||||
break;
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', null);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAnnonces);
|
||||
break;
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
break;
|
||||
case 'asso':
|
||||
if ( intval($siren)==0 && substr($session->getAutreId(),0,1)=='W' ) {
|
||||
$infos = $ws->getAnnoncesAsso($session->getAutreId(), $idAnn, null, $position, $nbAnnonces);
|
||||
} elseif (intval($siren)!=0) {
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
} else {
|
||||
$idAnn = $session->getSourceId();
|
||||
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
|
||||
}
|
||||
break;
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', null);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAnnonces);
|
||||
break;
|
||||
}
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
|
||||
$typeAnnonces = array(
|
||||
'Bodacc',
|
||||
'Balo',
|
||||
'Bomp',
|
||||
'Asso',
|
||||
);
|
||||
$typeAnnonces = array(
|
||||
'Bodacc',
|
||||
'Balo',
|
||||
'Bomp',
|
||||
'Asso',
|
||||
);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
|
||||
$this->view->assign('id', $session->getId());
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
$this->view->assign('id', $session->getId());
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
|
||||
//Affichage pour une annonce
|
||||
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
|
||||
//Affichage pour une annonce
|
||||
if (!empty($idAnn) && in_array($vue, array('bodacc', 'abod', 'balo', 'asso', 'bomp')) ) {
|
||||
|
||||
if ( $user->checkModeEdition() ){
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
|
||||
}
|
||||
if ( $user->checkModeEdition() ){
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/saisieannonces.js', 'text/javascript');
|
||||
}
|
||||
|
||||
$classType = 'annonces'.ucfirst($vue);
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
if($ann->id==$idAnn) break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($ann);
|
||||
$annonce = array(
|
||||
'Desc' => $objAnnonces->getAnnonceDesc($ann),
|
||||
'Entree' => $objAnnonces->getAnnonceEntree($ann),
|
||||
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
|
||||
'Even' => $objAnnonces->getAnnonceEven($ann),
|
||||
'Texte' => $objAnnonces->getAnnonceTexte($ann),
|
||||
'Type' => $objAnnonces->getType($ann),
|
||||
'Code' => $objAnnonces->getCode($ann),
|
||||
'Annee' => $objAnnonces->getAnnee($ann),
|
||||
'Num' => $objAnnonces->getNum($ann),
|
||||
'Deleted' => $objAnnonces->isDeleted($ann),
|
||||
//'Entites' => $objAnnonces->getAnnonceEntite($ann)
|
||||
);
|
||||
$classType = 'annonces'.ucfirst($vue);
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
if($ann->id==$idAnn) break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($ann);
|
||||
$annonce = array(
|
||||
'Desc' => $objAnnonces->getAnnonceDesc($ann),
|
||||
'Entree' => $objAnnonces->getAnnonceEntree($ann),
|
||||
'EntreeSD' => $objAnnonces->getAnnonceEntreeSD($ann),
|
||||
'Even' => $objAnnonces->getAnnonceEven($ann),
|
||||
'Texte' => $objAnnonces->getAnnonceTexte($ann),
|
||||
'Type' => $objAnnonces->getType($ann),
|
||||
'Code' => $objAnnonces->getCode($ann),
|
||||
'Annee' => $objAnnonces->getAnnee($ann),
|
||||
'Num' => $objAnnonces->getNum($ann),
|
||||
'Deleted' => $objAnnonces->isDeleted($ann),
|
||||
//'Entites' => $objAnnonces->getAnnonceEntite($ann)
|
||||
);
|
||||
|
||||
$this->view->assign('source', $session->getSource());
|
||||
if ( intval($this->siret)==0 ){
|
||||
$this->view->assign('sourceId', $session->getSourceId());
|
||||
} else {
|
||||
$this->view->assign('sourceId', null);
|
||||
}
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$this->view->assign('annonce', $annonce);
|
||||
$this->view->assign('source', $session->getSource());
|
||||
if ( intval($this->siret)==0 ){
|
||||
$this->view->assign('sourceId', $session->getSourceId());
|
||||
} else {
|
||||
$this->view->assign('sourceId', null);
|
||||
}
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
$this->view->assign('annonce', $annonce);
|
||||
|
||||
if ($request->getParam('q')=='ajax')
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
//$this->_helper->viewRenderer->setNoRender(true);
|
||||
$this->renderScript('juridique/annonce-ajax.phtml');
|
||||
} else {
|
||||
//Définir url pour téléchargement pdf
|
||||
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
|
||||
$lienBodacc = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'bodaccpdf',
|
||||
'type' => substr($annonce['Code'],3,1),
|
||||
'annee' => $annonce['Annee'],
|
||||
'num' => $annonce['Num'],
|
||||
), null, true);
|
||||
$this->view->assign('lienBodacc', $lienBodacc);
|
||||
}
|
||||
if ($request->getParam('q')=='ajax')
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
//$this->_helper->viewRenderer->setNoRender(true);
|
||||
$this->renderScript('juridique/annonce-ajax.phtml');
|
||||
} else {
|
||||
//Définir url pour téléchargement pdf
|
||||
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
|
||||
$lienBodacc = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'bodaccpdf',
|
||||
'type' => substr($annonce['Code'],3,1),
|
||||
'annee' => $annonce['Annee'],
|
||||
'num' => $annonce['Num'],
|
||||
), null, true);
|
||||
$this->view->assign('lienBodacc', $lienBodacc);
|
||||
}
|
||||
|
||||
$this->renderScript('juridique/annonce.phtml');
|
||||
}
|
||||
$this->renderScript('juridique/annonce.phtml');
|
||||
}
|
||||
|
||||
//Affichage pour la liste des annonces
|
||||
} else {
|
||||
//Affichage pour la liste des annonces
|
||||
} else {
|
||||
|
||||
$nbReponses = $infos->nbReponses;
|
||||
$nbPages = ceil($nbReponses/$nbAnnonces);
|
||||
$nbReponses = $infos->nbReponses;
|
||||
$nbPages = ceil($nbReponses/$nbAnnonces);
|
||||
|
||||
//Attention ajout des filtres
|
||||
if ( $p <= 1 ) {
|
||||
$lienPagePrecedente = false;
|
||||
} else {
|
||||
$lienPagePrecedente = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue'=> $vue,
|
||||
'p' => $p-1
|
||||
));
|
||||
}
|
||||
//Attention ajout des filtres
|
||||
if ( $p <= 1 ) {
|
||||
$lienPagePrecedente = false;
|
||||
} else {
|
||||
$lienPagePrecedente = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue'=> $vue,
|
||||
'p' => $p-1
|
||||
));
|
||||
}
|
||||
|
||||
if ( $p+1 > $nbPages ) {
|
||||
$lienPageSuivante = false;
|
||||
} else {
|
||||
$lienPageSuivante = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue' => $vue,
|
||||
'p' => $p+1
|
||||
));
|
||||
}
|
||||
if ( $p+1 > $nbPages ) {
|
||||
$lienPageSuivante = false;
|
||||
} else {
|
||||
$lienPageSuivante = $this->view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'annonces',
|
||||
'vue' => $vue,
|
||||
'p' => $p+1
|
||||
));
|
||||
}
|
||||
|
||||
$this->view->assign('nbPages',$nbPages);
|
||||
$this->view->assign('lienPagePrecedente',$lienPagePrecedente);
|
||||
$this->view->assign('lienPageSuivante',$lienPageSuivante);
|
||||
$this->view->assign('nbPages',$nbPages);
|
||||
$this->view->assign('lienPagePrecedente',$lienPagePrecedente);
|
||||
$this->view->assign('lienPageSuivante',$lienPageSuivante);
|
||||
|
||||
foreach ($typeAnnonces as $type)
|
||||
{
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces->$classType)>0)
|
||||
{
|
||||
foreach($objAnnonces->$classType as $ann)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('id:'.$ann->id.', deleted:'.$ann->deleted);
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
|
||||
}
|
||||
foreach ($typeAnnonces as $type)
|
||||
{
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces->$classType)>0)
|
||||
{
|
||||
foreach($objAnnonces->$classType as $ann)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('id:'.$ann->id.', deleted:'.$ann->deleted);
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/annonces.js', 'text/javascript');
|
||||
}
|
||||
} else {
|
||||
$this->view->assign('idAnn', $idAnn);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@
|
||||
<div class="paragraph">
|
||||
Aucune annonces disponible pour cette entitées.
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php } else {?>
|
||||
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
<style>
|
||||
@ -221,7 +221,6 @@ Néant
|
||||
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
<?=$this->render('cgu.phtml', $this->cgu)?>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<script>
|
||||
@ -232,3 +231,8 @@ $.get('/juridique/annoncenum/siren/<?=$this->siren?>', function(data){
|
||||
}, 'json');
|
||||
</script>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage)) {?>
|
||||
</div>
|
||||
<?php }?>
|
Loading…
Reference in New Issue
Block a user