diff --git a/application/modules/default/controllers/SaisieController.php b/application/modules/default/controllers/SaisieController.php index 6b94f572a..51de90e60 100644 --- a/application/modules/default/controllers/SaisieController.php +++ b/application/modules/default/controllers/SaisieController.php @@ -2910,15 +2910,21 @@ class SaisieController extends Zend_Controller_Action $mode = $request->getParam('mode'); $guichetMod = $request->getParam('guichetMod'); $banqueMod = $request->getParam('banqueMod'); - - $ws = new WsScores(); - $result = $ws->getIdentite($siren); - $infos = $ws->getBanques($siren); - - $this->view->assign('actif',$result->Actif); + $result=''; + if($mode!='add'){ + $params= new stdClass(); + $values=array( + 'siren' => str_replace(' ', '',$request->getParam('siren')), + 'codeBanque' => $banqueMod, + 'codeGuichet' => $guichetMod, + ); + $params->infos=json_encode($values); + $ws = new Scores_Ws_Client('saisie', '0.2'); + $result = $ws->getRib($params); + } $this->view->assign('siren', $siren); $this->view->assign('mode', $mode); - $this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array()); + $this->view->assign('banques', $result); $this->view->assign('guichetMod', $guichetMod); $this->view->assign('banqueMod', $banqueMod); @@ -2929,20 +2935,56 @@ class SaisieController extends Zend_Controller_Action public function ribansaveAction(){ $this->_helper->layout()->disableLayout(); $request = $this->getRequest(); - $codeBanque = str_replace(' ', '',$request->getParam('code_banque')); - $codeGuichet = str_replace(' ', '',$request->getParam('code_guichet')); - $numCompte = str_replace(' ', '',$request->getParam('num_compte')); - $bicSwift = str_replace(' ', '',$request->getParam('bic_swift')); - $iban = str_replace(' ', '',$request->getParam('iban')); - $mode = $request->getParam('mode'); + $params= new stdClass(); + $values=array( + 'siren' => str_replace(' ', '',$request->getParam('siren')), + 'codeBanque' => str_replace(' ', '',$request->getParam('code_banque')), + 'codeGuichet' => str_replace(' ', '',$request->getParam('code_guichet')), + 'numCompte' => str_replace(' ', '',$request->getParam('num_compte')), + 'bic' => str_replace(' ', '',$request->getParam('bic_swift')), + 'iban' => str_replace(' ', '',$request->getParam('iban')), + 'mode' => $request->getParam('mode'), + ); + $params->infos=json_encode($values); + $ws = new Scores_Ws_Client('saisie', '0.2'); + $result = $ws->setRib($params); + if($result){ + echo 'Opération enregistrée'; + }else { + echo 'Opération échouée '; + } + die; + } - $this->view->assign('code_banque', $codeBanque); - $this->view->assign('code_guichet', $codeGuichet); - $this->view->assign('num_compte', $numCompte); - $this->view->assign('bic_swift', $bicSwift); - $this->view->assign('iban', $iban); + public function testwsAction(){ + $c = Zend_Registry::get('config'); + $wsdl = 'http://webservice.sd.dev/saisie/v0.2?wsdl-auto'; + $options = array( '0.2' => array( + 'setRib' => array( + 'debug' => true, + 'log' => 'mail', + ), + ), + ); + $options['features'] = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS; + $options['compression'] = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE; + $options['login'] = 'cdelbos'; + $options['password'] = 'coucou'; + if (APPLICATION_ENV == 'development'){ + $options['cache_wsdl'] = WSDL_CACHE_NONE; + } + $options['trace'] = true; + $options['encoding'] = 'utf-8'; + $client = false; + $client = new SoapClient($wsdl, $options); + $params = new stdClass(); + $params->infos=json_encode(array('siren' => '809613144','mode' => 'add', 'codeBanque' => '20041')); + $reponse = $client->setRib($params); + var_dump($reponse);die; } + + } \ No newline at end of file diff --git a/application/modules/default/controllers/SurveillanceController.php b/application/modules/default/controllers/SurveillanceController.php index ed0db1051..0b752af7a 100644 --- a/application/modules/default/controllers/SurveillanceController.php +++ b/application/modules/default/controllers/SurveillanceController.php @@ -1190,7 +1190,7 @@ class SurveillanceController extends Zend_Controller_Action // Main email $email = $user->getEmail(); - $ref=$user->identity->id . 'www'.Date('YmdHis'); + $ref=$user->identity->id . 'surv'.Date('YmdHis'); foreach ($this->sourceDroit as $s => $perm) { if ($user->checkPerm($perm)) { $tabSource[] = array( diff --git a/application/modules/default/views/default/scripts/finance/banque.phtml b/application/modules/default/views/default/scripts/finance/banque.phtml index c522021a1..0ce1f8e4f 100644 --- a/application/modules/default/views/default/scripts/finance/banque.phtml +++ b/application/modules/default/views/default/scripts/finance/banque.phtml @@ -42,7 +42,7 @@

libBanque?>

AutrePage) && $this->edition) {?> - + diff --git a/application/modules/default/views/default/scripts/saisie/ribiban.phtml b/application/modules/default/views/default/scripts/saisie/ribiban.phtml index 156bc1da4..a32707d11 100644 --- a/application/modules/default/views/default/scripts/saisie/ribiban.phtml +++ b/application/modules/default/views/default/scripts/saisie/ribiban.phtml @@ -4,13 +4,19 @@ div#dialog fieldset {border:1px solid; padding:1px; } div#dialog fieldset legend {padding:5px; font-weight:bold; } - - +getBDF_Etabs('php'); +$list_bq=json_encode($banques); +$list_guichets=$bq->getBDF_Guichets(); +$lbanque = (array)json_decode($this->banques); +//var_dump($lbanque); +?>
-mode == 'add' || $this->mode == 'edit'){?> +mode == 'add' || $this->mode == 'edit'){?>
@@ -23,7 +29,7 @@ div#dialog fieldset legend {padding:5px; font-weight:bold; }
actif==1){ +if ($this->actif==1 || (isset($lbanque['dateSuppr']) && $lbanque['dateSuppr']=='0000-00-00 00:00:00') ){ $checkActive = 'checked'; $checkInactive = ''; } else { @@ -43,33 +49,35 @@ if ($this->actif==1){
- + + $name):?> + + +
- + +
- - - + + +
@@ -82,20 +90,25 @@ if ($this->actif==1){
- +
- +
+ + + + +

Voulez vous supprimer ce RIB ?

@@ -105,11 +118,52 @@ if ($this->actif==1){