diff --git a/application/modules/default/controllers/FinanceController.php b/application/modules/default/controllers/FinanceController.php
index 4aa606061..5e0872c1e 100644
--- a/application/modules/default/controllers/FinanceController.php
+++ b/application/modules/default/controllers/FinanceController.php
@@ -1070,7 +1070,7 @@ class FinanceController extends Zend_Controller_Action
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
- $this->view->assign('banques', $infos->result->item);
+ $this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array());
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9));
$this->view->assign('exportObjet', $infos);
diff --git a/application/modules/default/controllers/JuridiqueController.php b/application/modules/default/controllers/JuridiqueController.php
index e19178aa5..8c66a41e7 100644
--- a/application/modules/default/controllers/JuridiqueController.php
+++ b/application/modules/default/controllers/JuridiqueController.php
@@ -381,7 +381,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->msg = "Erreur";
} else {
- $this->view->List = $response->List->item;
+ $this->view->List = isset($response->List->item)?$response->List->item:null;
// --- Pagination
$nbReponsesTotal = $response->Nb;
$pageTotal = $pageCurrent = 1;
diff --git a/application/modules/default/controllers/RechercheController.php b/application/modules/default/controllers/RechercheController.php
index 6baa9655e..b40a41852 100644
--- a/application/modules/default/controllers/RechercheController.php
+++ b/application/modules/default/controllers/RechercheController.php
@@ -806,6 +806,8 @@ class RechercheController extends Zend_Controller_Action
//Calcul pagination
$nbReponses = $reponse->nbReponses;
$nbReponsesTotal = $reponse->nbReponsesTotal;
+ $pagePrev=1;
+ $pageNext=1;
if ($nbReponses < $nbReponsesTotal) {
$pageTotal = ceil( $nbReponsesTotal / $nbAffichage );
$pageCurrent = $page;
diff --git a/application/modules/default/controllers/SaisieController.php b/application/modules/default/controllers/SaisieController.php
index 1c05ba4f9..6b94f572a 100644
--- a/application/modules/default/controllers/SaisieController.php
+++ b/application/modules/default/controllers/SaisieController.php
@@ -2918,7 +2918,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('actif',$result->Actif);
$this->view->assign('siren', $siren);
$this->view->assign('mode', $mode);
- $this->view->assign('banques', $infos->result->item);
+ $this->view->assign('banques', isset($infos->result->item)?$infos->result->item:array());
$this->view->assign('guichetMod', $guichetMod);
$this->view->assign('banqueMod', $banqueMod);
@@ -2937,7 +2937,7 @@ class SaisieController extends Zend_Controller_Action
$mode = $request->getParam('mode');
- $this->view->assign('code_banque', $guichetMod);
+ $this->view->assign('code_banque', $codeBanque);
$this->view->assign('code_guichet', $codeGuichet);
$this->view->assign('num_compte', $numCompte);
$this->view->assign('bic_swift', $bicSwift);
diff --git a/application/modules/default/controllers/SurveillanceController.php b/application/modules/default/controllers/SurveillanceController.php
index 20963e00d..ed0db1051 100644
--- a/application/modules/default/controllers/SurveillanceController.php
+++ b/application/modules/default/controllers/SurveillanceController.php
@@ -383,7 +383,7 @@ class SurveillanceController extends Zend_Controller_Action
$ws = new WsScores();
$infos = $ws->getSurveillances($filtre, $position, $nbAffichage);
- $surveillances = $infos->result->item;
+ $surveillances = isset($infos->result->item)?$infos->result->item:null;
$listTrier = array();
if ( count($surveillances)>0 ) {
@@ -1155,4 +1155,56 @@ class SurveillanceController extends Zend_Controller_Action
$html2pdf->WriteHTML(utf8_decode($output));
$html2pdf->Output(str_replace('.csv', '.pdf', $nomFic), 'D');
}
+
+ /**
+ * Import surveillance en fichier csv
+ */
+ public function surveillanceserieAction(){
+ //echo 'coucou';die;
+ $request = $this->getRequest();
+ if($request->getParam('ref')>""){
+ $cs=new Scores_Import_FileCsv();
+ $verif=$cs->verifandupload($_FILES,$request);
+ if($verif['success']){
+ $this->view->assign('msg', 'Nous avons enregistré votre fichier de '.$verif['message'].' lignes.
Les surveillances seront enregistrées durant la nuit.');
+ $this->view->assign('step', 2);
+ }else{
+ $this->view->assign('msg', $verif['message']);
+ $this->view->assign('step', 2);
+ }
+ return;
+ }
+ //Affichage formulaire demande ref et email
+ $this->_helper->layout->disableLayout();
+ $source = $request->getParam('source', '');
+ $encours = $request->getParam('encours', 0);
+ $this->view->pathScript=$this->theme->pathScript;
+ $this->view->pathStyle=$this->theme->pathStyle;
+ $user = new Scores_Utilisateur();
+
+ $request = $this->getRequest();
+ $source = $request->getParam('source');
+
+ $tabSource = array();
+ $user = new Scores_Utilisateur();
+
+ // Main email
+ $email = $user->getEmail();
+ $ref=$user->identity->id . 'www'.Date('YmdHis');
+ foreach ($this->sourceDroit as $s => $perm) {
+ if ($user->checkPerm($perm)) {
+ $tabSource[] = array(
+ 'value' => $s,
+ 'name' => $this->sourceTxt[$s],
+ 'select' => (!empty($source) && $source==$s) ? ' selected' : '',
+ );
+ }
+ }
+
+ $this->view->assign('tabSource', $tabSource);
+ $this->view->assign('email', $email);
+ $this->view->assign('ref', $ref);
+ $this->view->assign('encours', $encours);
+ $this->view->msg="Sélectionnez votre fichier";
+ }
}
\ No newline at end of file
diff --git a/application/modules/default/views/default/scripts/saisie/ribiban.phtml b/application/modules/default/views/default/scripts/saisie/ribiban.phtml
index a9dca9c90..156bc1da4 100644
--- a/application/modules/default/views/default/scripts/saisie/ribiban.phtml
+++ b/application/modules/default/views/default/scripts/saisie/ribiban.phtml
@@ -8,7 +8,7 @@ div#dialog fieldset legend {padding:5px; font-weight:bold; }