Correction probleme lors du déplacement d'un lien (setLienChange)
This commit is contained in:
parent
5beffa5180
commit
942eceb01d
@ -1580,15 +1580,18 @@ class SaisieController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
if ( $lienRef && $siren !== null ) {
|
||||
if ( $lienRef !== null ) {
|
||||
Zend_Registry::get('firebug')->info('lienRef:'.$lienRef);
|
||||
$result = $ws->getLienRef($lienRef);
|
||||
$rs = $result->RS;
|
||||
if ( intval($result->siren)!=0 ) {
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
$rs = $result->raisonSociale;
|
||||
//Override session session
|
||||
if ( intval($result->siren) != 0 ) {
|
||||
$siren = $result->siren;
|
||||
$session = new SessionEntreprise($siren);
|
||||
}
|
||||
|
||||
} else {
|
||||
} elseif ($siren !== null) {
|
||||
$session = new SessionEntreprise($siren);
|
||||
$rs = $session->getRaisonSociale();
|
||||
}
|
||||
@ -2255,11 +2258,13 @@ class SaisieController extends Zend_Controller_Action
|
||||
$lienref = $request->getParam('lienref');
|
||||
$this->view->assign('lienref', $lienref);
|
||||
|
||||
$idLien = $request->getParam('idLien');
|
||||
$this->view->assign('idLien', $idLien);
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
//Save data
|
||||
if ( $request->isPost() ){
|
||||
$idLien = $request->getParam('idLien');
|
||||
$id = $request->getParam('id');
|
||||
$result = $ws->setLienChange($mode, $idLien, $id);
|
||||
if (true === $result) {
|
||||
@ -2290,7 +2295,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
{
|
||||
$ws = new WsScores();
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
|
||||
$request = $this->getRequest();
|
||||
$siren = $request->getParam('siren');
|
||||
|
||||
@ -2317,7 +2322,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
// end checking values
|
||||
|
||||
|
||||
if ($message == '') {
|
||||
$message = $ws->setScoreCutoff($params['siren'], $params['encours']*1000, $params['scoreSolv'], $params['scoreDir'], $params['scoreConf'], $params['remarque']);
|
||||
if (is_int($message)){
|
||||
@ -2329,7 +2334,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->view->assign('name', "Définir un Cut-off");
|
||||
$this->view->assign('href', $this->view->url(array('controller'=>'saisie','action'=>'scorecutoff','siren'=>$siren)));
|
||||
}
|
||||
|
||||
|
||||
$getcutoff = json_decode($ws->getScoreCutoff($siren), true);
|
||||
if(!$getcutoff) {
|
||||
$message = "Aucun Cut-off est défini, merci de remplir toutes les valeurs";
|
||||
@ -2344,7 +2349,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
'dateUpdate' => '0000-00-00'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$this->view->assign('getcutoff', $getcutoff);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('typescore', $user->getTypeScore());
|
||||
|
@ -197,11 +197,11 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
|
||||
<td width="150">
|
||||
<a class="documentsLien" title="Documents associés" href="<?=$this->url(array('controller'=>'identite','action'=>'liendoc','id'=>$lien->id,'type'=>'Lien'), null, true)?>">+</a>
|
||||
<?php if ($part == 'actionnaires') {?>
|
||||
<a class="dialog" title="Fusionner/Déplacer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'moveact','lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
|
||||
<a class="dialog" title="Fusionner/Déplacer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'moveact','idLien'=>$lien->id,'lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
|
||||
<a class="dialog" title="Modifier actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'edit','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'delete','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
<?php } else {?>
|
||||
<a class="dialog" title="Fusionner/Déplacer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'movepar','lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
|
||||
<a class="dialog" title="Fusionner/Déplacer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'movepar','idLien'=>$lien->id,'lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
|
||||
<a class="dialog" title="Modifier participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'edit','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
|
||||
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
|
||||
<?php }?>
|
||||
|
@ -28,7 +28,10 @@ div#dialog .ui-widget-content { text-align:left; }
|
||||
<?php if ($this->type=='actionnaire') {?>
|
||||
|
||||
<?php if ( $this->mode == 'add' ) {?>
|
||||
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs?>
|
||||
(<?php echo intval($this->siren)!=0 ? $this->siren : $this->id1 ; ?>)
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $this->id2 ) {?>
|
||||
<b>Fiche créée <?=$this->id2Nom?> (id = <?=$this->id2?>)</b>
|
||||
@ -130,7 +133,8 @@ div#dialog .ui-widget-content { text-align:left; }
|
||||
<?php if ($this->type=='participation') {?>
|
||||
|
||||
<?php if ( $this->mode == 'add' ) { ?>
|
||||
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
|
||||
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs?>
|
||||
(<?php echo intval($this->siren)!=0 ? $this->siren : $this->id1 ; ?>)</div>
|
||||
|
||||
<?php if ( $this->id2 ) {?>
|
||||
<b>Fiche créée <?=$this->id2Nom?> (id = <?=$this->id2?>)</b>
|
||||
|
@ -15,7 +15,7 @@ $('#dialog').dialog({ buttons: [{ text: "Fermer", click: function() {$(this).dia
|
||||
|
||||
<form name="lienchange" method="post" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'lienchange'),null,true)?>">
|
||||
|
||||
<input type="hidden" name="idLien" value="<?=$this->lienref?>"/>
|
||||
<input type="hidden" name="idLien" value="<?=$this->idLien?>"/>
|
||||
<input type="hidden" name="mode" value="<?=$this->mode?>"/>
|
||||
|
||||
<?php if ($this->mode=='fusion') {?>
|
||||
|
Loading…
Reference in New Issue
Block a user