Fix issue sur la liste BOAMP et la panination

This commit is contained in:
Michael RICOIS 2016-11-28 11:48:38 +01:00
parent 0f27e69168
commit 1bb82500a1
3 changed files with 46 additions and 57 deletions

View File

@ -41,7 +41,7 @@ class JuridiqueController extends Zend_Controller_Action
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
if ($fj > 9000 && $fj < 9999 && intval($siren) == 0) {
$vue = 'asso';
}
@ -51,17 +51,16 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $autrePage);
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
if ($session->getSource() == '006' || $session->getSourceId() == '007') {
$this->view->assign('AutreSource', true);
} else {
$this->view->assign('vue', $vue);
//Pagination
$page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1;
if ( $page <= 0 ) {
$page = 1;
}
$nbAffichage = 20;
$position = ($page - 1 ) * $nbAffichage;
@ -89,12 +88,14 @@ class JuridiqueController extends Zend_Controller_Action
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', null);
$filtre = $request->getParam('filtre', 'A');
$this->view->assign('filtre', $filtre);
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
break;
}
if ($infos === false) $this->_forward('soap', 'error');
if ($infos === false) {
$this->forward('soap', 'error');
}
Zend_Registry::get('firebug')->info($infos);
require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item);
@ -157,13 +158,11 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('PageCurrent', $page);
//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'],
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'],
), 'default', true);
$this->view->assign('lienBodacc', $lienBodacc);
}

View File

@ -11,25 +11,20 @@
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData">
<?=$this->raisonSociale?>
<?php if($this->hasModeEdition) : ?>
<a href="<?=$this->url(array(
'controller' => 'saisie',
'action' => 'fiche',
'siret' => $this->siret,
'id' => $this->id,
<?=$this->raisonSociale?>
<?php if($this->hasModeEdition) { ?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche',
'siret' => $this->siret, 'id' => $this->id,
), 'default', true)?>">(Edition)</a>
<?php endif; ?>
<?php }?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'annonces',
'siret' => $this->siret
))?>
<?=$this->action('infos', 'surveillance', null, array('source' => 'annonces',
'siret' => $this->siret))?>
</td>
</tr>
<?php }?>
@ -133,7 +128,6 @@ Télécharger le bulletin officiel</a>
<a href="<?=$this->url(array('controller'=>'identite','action'=>'fiche','siret'=>$entite->siret), 'default', true)?>">
<?=$this->SiretTexte($entite->siret)?></a>
<?php }?>
</td>
</tr>
<?php }?>
@ -144,13 +138,8 @@ Télécharger le bulletin officiel</a>
<div class="paragraph" style="text-align:center;">
<?php if (intval($this->siret)!=0) {?>
<?php
$href = $this->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->siret,
'id' => $this->id,
'vue' => $this->vue,
'page' => $this->PageCurrent,
$href = $this->url(array('controller' => 'juridique', 'action' => 'annonces',
'siret' => $this->siret, 'id' => $this->id, 'vue' => $this->vue, 'page' => $this->PageCurrent,
), 'default', true);
?>
<a href="<?=$href?>">Revenir à la liste des annonces</a>

View File

@ -1,8 +1,8 @@
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
<div id="center">
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
<h1 class="titre">ANNONCES L&Eacute;GALES</h1>
<div class="paragraph">
<table class="identite">
@ -15,30 +15,24 @@
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?>
<?php if($this->hasModeEdition) : ?>
<a href="<?=$this->url(array(
'controller' => 'saisie',
'action' => 'fiche',
'siret' => $this->siret,
'id' => $this->id,
))?>">(Edition)</a>
<?php endif ?>
<?php if($this->hasModeEdition) {?>
<a href="<?=$this->url(array('controller' => 'saisie', 'action' => 'fiche',
'siret' => $this->siret, 'id' => $this->id))?>">(Edition)</a>
<?php }?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'annonces',
'siret' => $this->siret
))?>
<?=$this->action('infos','surveillance', null, array('source' => 'annonces',
'siret' => $this->siret))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php endif;?>
<?php }?>
<?php if ($this->AutreSource){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
@ -110,19 +104,27 @@ a.lienType {
<div class="clearfix" style="margin:0 auto 5px auto;">
<div id="TypeBodacc" class="blockType<?php if ($this->vue=='bodacc') echo 'Active';?>">
<a class="lienType" title="Annonces légales" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bodacc', 'siret'=>$this->siret, 'id'=>$this->id))?>">Annonces Légales</a>
<a class="lienType" title="Annonces légales" href="<?=$this->url(array('controller'=>'juridique',
'action'=>'annonces', 'vue'=>'bodacc', 'siret'=>$this->siret,
'id'=>$this->id))?>">Annonces Légales</a>
</div>
<div id="TypeBalo" class="blockType<?php if ($this->vue=='balo') echo 'Active';?>">
<a class="lienType" title="Bulletin des Annonces Légales Obligatoires" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'balo', 'siret'=>$this->siret, 'id'=>$this->id))?>">B.A.L.O.</a>
<a class="lienType" title="Bulletin des Annonces Légales Obligatoires" href="<?=$this->url(array(
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'balo', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.A.L.O.</a>
</div>
<div id="TypeBoamp" class="blockType<?php if ($this->vue=='bomp') echo 'Active';?>">
<a class="lienType" title="Bulletin officiel des annonces des marchés publics" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret, 'id'=>$this->id))?>">B.O.A.M.P.</a>
<a class="lienType" title="Bulletin officiel des annonces des marchés publics" href="<?=$this->url(array(
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp', 'siret'=>$this->siret,
'id'=>$this->id))?>">B.O.A.M.P.</a>
</div>
<div id="TypeAsso" class="blockType<?php if ($this->vue=='asso') echo 'Active';?>">
<a class="lienType" title="Journal Officiel des Associations" href="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'asso', 'siret'=>$this->siret, 'id'=>$this->id))?>">J.O Associations</a>
<a class="lienType" title="Journal Officiel des Associations" href="<?=$this->url(array(
'controller'=>'juridique', 'action'=>'annonces', 'vue'=>'asso', 'siret'=>$this->siret,
'id'=>$this->id))?>">J.O Associations</a>
</div>
</div>
@ -132,7 +134,7 @@ a.lienType {
<?php if ($this->vue=='bodacc'){ ?>
<h2>EV&Eacute;NEMENTS L&Eacute;GAUX</h2>
<div class="paragraph">
<?php if(count($this->annoncesBodacc)==0){ ?>
<?php if(count($this->annoncesBodacc) ==0 ) { ?>
Néant
<?php } else {?>
<table class="data">
@ -161,7 +163,6 @@ a.lienType {
'action'=>'annonces','vue'=>'bomp','siret'=>$this->siret,'id'=>$this->id),null,true)?>">
<label>Type d'annonce</label>
<select name="filtre">
<option value="">-</option>
<option value="A"<?=($this->filtre=='A')?' selected':'';?>>Avis d'attribution</option>
<option value="M"<?=($this->filtre=='M')?' selected':'';?>>Avis de marchés</option>
</select>