Enquete commercial
This commit is contained in:
parent
a1949fb853
commit
4a392ac155
@ -496,12 +496,22 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$InfoEnq['Precisions']['Type'] = "Autre type d'enquête (Précisez...)";
|
||||
unset($InfoEnq['PrecisionsChoix']);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
$ws = new WsScore();
|
||||
$result = $ws->commandeEnquete($siren, $InfoEnq, $InfoDemande);
|
||||
$commandeEnquete = TRUE;
|
||||
*/
|
||||
if ($result === false) {
|
||||
$this->_forward('soap', 'error');
|
||||
} else {
|
||||
$this->view->assign('annee', substr($result->dateCommande,0,4));
|
||||
$this->view->assign('mois', substr($result->dateCommande,4,2));
|
||||
$this->view->assign('jour', substr($result->dateCommande,6,2));
|
||||
$this->view->assign('heure', substr($result->dateCommande,8,2));
|
||||
$this->view->assign('minutes', substr($result->dateCommande,10,2));
|
||||
$this->view->assign('ref', substr($result->refCmde,1));
|
||||
$this->view->assign('siren', $result->siren);
|
||||
$commandeEnquete = true;
|
||||
}
|
||||
$this->view->assign('commandeEnquete', $commandeEnquete);
|
||||
}
|
||||
$this->view->assign('formError', $formError);
|
||||
$this->view->assign('message', $message);
|
||||
|
@ -356,29 +356,11 @@ if( isset($pays) && $pays!='' )
|
||||
|
||||
if($this->commandeEnquete == true)
|
||||
{
|
||||
if($result['results']['error']['errnum']==0){
|
||||
$annee = substr($result['results']['dateCommande'],0,4);
|
||||
$mois = substr($result['results']['dateCommande'],4,2);
|
||||
$jour = substr($result['results']['dateCommande'],6,2);
|
||||
$heure = substr($result['results']['dateCommande'],8,2);
|
||||
$minutes = substr($result['results']['dateCommande'],10,2);
|
||||
$ref = substr($result['results']['refCmde'],1);
|
||||
$siren = $result['results']['siren'];
|
||||
|
||||
?>
|
||||
<p>
|
||||
Votre demande à été prise en compte le <?=$jour.'/'.$mois.'/'.$annee?> à <?=$heure?> h <?=$minutes?> sous la référence <b><?=$ref?></b> pour le siren <b><?=$siren?></b>.
|
||||
Votre demande à été prise en compte le <?=$this->jour.'/'.$this->mois.'/'.$this->annee?> à <?=$this->heure?> h <?=$this->minutes?> sous la référence <b><?=$this->ref?></b> pour le siren <b><?=$this->siren?></b>.
|
||||
</p>
|
||||
<?php
|
||||
}else{
|
||||
$errnum = $result['results']['error']['errnum'];
|
||||
$errmsg = $result['results']['error']['errmsg'];
|
||||
?>
|
||||
<p style="color:red;">
|
||||
Erreur n° <?=$errnum?> - <?=$errmsg?>.
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
@ -29,6 +29,28 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Commande d'une enquete intersud
|
||||
* @param string $siren
|
||||
* @param array $infoEnq
|
||||
* @param array $infoUser
|
||||
*/
|
||||
public function commandeEnquete($siren, $infoEnq, $infoUser)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->siren = $siren;
|
||||
$params->infoEnq = json_encode($infoEnq);
|
||||
$params->infoDemande = json_encode($infoUser);
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->commandeEnquete($params);
|
||||
return $reponse->commandeEnqueteResult;
|
||||
} catch (SoapFault $fault) {
|
||||
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function setInfosEntrep($siret, $id, $tabInfos)
|
||||
{
|
||||
$params = new stdClass();
|
||||
|
Loading…
Reference in New Issue
Block a user