diff --git a/application/modules/default/views/default/scripts/saisie/form.phtml b/application/modules/default/views/default/scripts/saisie/form.phtml index 2b4bbbf1d..b4d8d282c 100644 --- a/application/modules/default/views/default/scripts/saisie/form.phtml +++ b/application/modules/default/views/default/scripts/saisie/form.phtml @@ -105,5 +105,5 @@ if (count($this->tabEvent)>0) { ?>
-action('even', 'saisie', null, array('num'=> $this->eventNum, 'siren'=>substr($this->siret,0,9)))?> +action('even', 'saisie', input, array('num'=> $this->eventNum, 'siren'=>substr($this->siret,0,9)))?>
\ No newline at end of file diff --git a/application/modules/input/controllers/DirigeantController.php b/application/modules/input/controllers/DirigeantController.php index 7ba91218d..d2dcaade0 100644 --- a/application/modules/input/controllers/DirigeantController.php +++ b/application/modules/input/controllers/DirigeantController.php @@ -2,67 +2,87 @@ class Input_DirigeantController extends Zend_Controller_Action { protected $theme; - + public function init() { // --- Theme $this->theme = Zend_Registry::get('theme'); } - + /** * Ajouter, modifier ou supprimer des dirigeants oppérationnels */ + + + /** + * Retourne Fonctions de direction + */ + protected function fctDir() + { + $fctdir = new Application_Model_FctDir(); + $sql = $fctdir->select('codeFct, libelle'); + $selectDir['0000'] = '-'; + $rows = $fctdir->fetchAll($sql); + if ( count($rows)>0 ) { + foreach ($rows as $item) { + $index = str_pad($item->codeFct, 4, "0", STR_PAD_LEFT); + $selectDir[$index] = $item->libelle; + } + } + return $selectDir; + } + public function opcontrolAction() { $this->_helper->layout()->disableLayout(); - + $request = $this->getRequest(); $mode = $request->getParam('mode'); $id = $request->getParam('id', null); $siret = $request->getParam('siret'); $siren = substr($siret, 0, 9); $nic = substr($siret, 9, 5); - + $ws = new WsScores(); - + switch ($mode) { case 'add': $fonction = $this->fctDir(); - + $this->view->assign('fonction', $fonction); break; - + case 'edit': $fonction = $this->fctDir(); $infos = $ws->getDirigeantsOp($siren, $id); - + $this->view->assign('fonction', $fonction); $this->view->assign('infos', $infos->item[0]); break; } - + $this->view->assign('mode', $mode); $this->view->assign('id', $id); $this->view->assign('siren', $siren); $this->view->assign('nic', $nic); } - + /** * Sauvegarder les modifications des dirigeants oppérationnels */ public function opsaveAction() { $this->_helper->layout()->disableLayout(); - + $params = $this->getRequest()->getParams(); $message = ''; - + $newDate = '0000-00-00'; if (trim($params['naiss_date']) != '') { $date = new Zend_Date($params['naiss_date'], 'dd/MM/yyyy'); $newDate = $date->toString('yyyy-MM-dd'); } - + $infos = array( 'siren' => $params['siren'], 'nic' => $params['nic'], @@ -77,9 +97,9 @@ class Input_DirigeantController extends Zend_Controller_Action 'fax' => $params['fax'], 'email' => $params['email'] ); - + $ws = new WsScores(); - + if($params['mode'] == 'add'){ $message = $this->view->translate('Ajout'); } else if ($params['mode'] == 'edit') { @@ -87,9 +107,9 @@ class Input_DirigeantController extends Zend_Controller_Action } else if ($params['mode'] == 'del') { $message = $this->view->translate('Suppression'); } - + $result = $ws->setDirigeantsOp(json_encode($infos), $params['mode'], $params['id']); - + if ($result>0) { $message = $message.' '.$this->view->translate('a été réussi!'); } else if ($result===0) { @@ -97,7 +117,7 @@ class Input_DirigeantController extends Zend_Controller_Action } else { $message = $result; } - + $this->view->assign('message', $message); - } + } } \ No newline at end of file diff --git a/application/modules/input/views/default/scripts/dirigeant/opcontrol-form.phtml b/application/modules/input/views/default/scripts/dirigeant/opcontrol-form.phtml index 10b1de4cf..8a8ce9b44 100644 --- a/application/modules/input/views/default/scripts/dirigeant/opcontrol-form.phtml +++ b/application/modules/input/views/default/scripts/dirigeant/opcontrol-form.phtml @@ -9,7 +9,7 @@
-infos->Civilite)==0)?"checked":""; diff --git a/application/modules/input/views/default/scripts/dirigeant/opcontrol.phtml b/application/modules/input/views/default/scripts/dirigeant/opcontrol.phtml index 6c787df64..daebe2fb4 100644 --- a/application/modules/input/views/default/scripts/dirigeant/opcontrol.phtml +++ b/application/modules/input/views/default/scripts/dirigeant/opcontrol.phtml @@ -1,17 +1,17 @@ -
-mode=='add') { echo $this->translate("Ajouter un dirigeant opérationnel"); echo $this->partial('/input/dirigeant/opcontrol-form.phtml', array('fonction'=>$this->fonction)); } else if ($this->mode=='edit') { echo $this->translate("Modifier le dirigeant opérationnel"); - echo $this->render('/input/dirigeant/opcontrol-form.phtml'); + echo $this->render('/dirigeant/opcontrol-form.phtml'); } else if ($this->mode=='del') echo $this->translate("Supprimer le dirigeant opérationnel"); ?> diff --git a/application/modules/legal/views/default/scripts/pieces/commande.phtml b/application/modules/legal/views/default/scripts/pieces/commande.phtml index 309d25c8f..a16e21fa4 100644 --- a/application/modules/legal/views/default/scripts/pieces/commande.phtml +++ b/application/modules/legal/views/default/scripts/pieces/commande.phtml @@ -71,27 +71,27 @@ } ?> permSurvPriv ) { ?> -

url(array('module'=>'default', 'controller'=>'surveillance', 'action'=>'ajouter', 'source'=>'privileges', 'siret'=>$this->siret), 'default', true)?>">Commander la mise en suivi des privilèges (surveillance des privilèges auprès du greffe, retour sous 48 à 72h)

Privilèges de la sécurité sociale et des régimes complémentaires - Commander

Privilèges du Trésor Public - url(array('module'=>'legal', 'controller'=>'pieces', 'action'=>'privilege', 'siren'=>$this->siren, 'type'=>'privtres'), 'default', true)?>">Commander

-

Nantissements du fonds de commerce ou du fonds artisanal (conventionnels et judiciaires) - - Commander

Déclarations de créances - url(array('module'=>'legal', 'controller'=>'pieces', 'action'=>'privilege', 'siren'=>$this->siren, 'type'=>'declcrea'), 'default', true)?>">Commander