Merge branch 'develop' into wip-2.9-design2016

Conflicts:
	.gitignore
	library/Scores/Ws/Client/Entreprise.php
	library/Scores/Ws/Client/Gestion.php
This commit is contained in:
Michael RICOIS 2016-08-03 14:36:46 +02:00
commit 71ed59896e
18 changed files with 395 additions and 86 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/.settings/
/vendor/
/.buildpath
/.project
/vendor/
/.user.ini

View File

@ -1024,11 +1024,11 @@ class EvaluationController extends Zend_Controller_Action
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
$infos->Indiscore->tabCommentaires->item,
$infos->RatiosInfos,
$infos->RatiosBilansInfos,
$infos->RatiosSecteur,
$infos->Indiscore->tabVariables
);
$this->view->assign('comment',$rapportComment->out());
@ -1038,4 +1038,29 @@ class EvaluationController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
public function cadastreAction()
{
$this->view->headTitle()->prepend("Cadastre");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret,0,9);
$ws = new Scores_Ws_Client('entreprise', '0.9');
$params = new stdClass();
$params->companyId = $siren;
try {
$response = $ws->getCadastrePatrimoine($params);
$this->view->List = $response->item;
} catch (Exception $e) {
$this->view->MsgTxt = $e->getMessage();
}
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
}
}

View File

@ -147,6 +147,7 @@ class IdentiteController extends Zend_Controller_Action
'Isin',
'Capitalisation',
'NumRC',
'NumRM',
'AutreId',
'Actif',
'SituationJuridique',
@ -170,6 +171,7 @@ class IdentiteController extends Zend_Controller_Action
'Groupe',
'ActiviteEn',
'ActiviteEt',
'ActiviteArtisanale',
'Naf4',
'Nace',
'NatureActivite',

View File

@ -930,6 +930,7 @@ class SaisieController extends Zend_Controller_Action
// --- Correction d'un bilan
if ($date!='NEW') {
$milDate = $milDatePre = null;
// --- Recherche dans la liste des bilans
$listBilans = $ws->getListeBilans($siren);
if ( count($listBilans->result->item) > 0 ) {
foreach ($listBilans->result->item as $item) {
@ -937,13 +938,14 @@ class SaisieController extends Zend_Controller_Action
if ($item->dateExercice == $date) {
$milDate = $item->dateExercice;
}
if (substr($item->dateExercice,0,4) == intval(substr($date,0,4))-1) {
if (intval(substr($item->dateExercice,0,4)) == intval(substr($date,0,4))-1) {
$milDatePre = $item->dateExercice;
}
}
}
}
// --- Selection des valeurs du bilan en cours
if ( null !== $milDate ) {
Zend_Registry::get('firebug')->info('milDate');
$response = $ws->getBilan($siren, $milDate, $type, true);
@ -958,7 +960,9 @@ class SaisieController extends Zend_Controller_Action
foreach ($response->POSTES->item as $item) {
$postes[$item->id] = $item->val;
}
} elseif ( null === $milDate && null !== $milDatePre ) {
}
// --- Selection des valeurs du bilan précédent pour remplir la colonne N-1
elseif ( null === $milDate && null !== $milDatePre ) {
Zend_Registry::get('firebug')->info('milDatePre');
$response = $ws->getBilan($siren, $milDatePre, $type, true);
Zend_Registry::get('firebug')->info($response);

View File

@ -179,11 +179,19 @@ class UserController extends Zend_Controller_Action
$parameters->login = $login;
$parameters->ipUtilisateur = $adressIp;
$parameters->from = null;
$reponse = $ws->getInfosLogin($parameters);
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
try {
$reponse = $ws->getInfosLogin($parameters);
if ($reponse === false) {
$this->view->message = "Impossible d'afficher l'utilisateur.";
} else {
$this->view->assign('options', $reponse->result);
$this->view->assign('loginVu', $reponse->result->login);
$this->view->assign('droits', explode(' ', strtolower($reponse->result->droits)));
$this->view->assign('droitsClients', explode(' ', strtolower($reponse->result->droitsClients)));
}
} catch (Exception $e) {
$this->view->message = $e->getMessage();
}
} else {
$this->view->assign('options', $identity);
$this->view->assign('loginVu', $identity->username);

View File

@ -0,0 +1,138 @@
<div id="center">
<h1>PATRIMOINE FONCIER</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<?php if ($this->MsgTxt) {?>
<div class="paragraph"><?=$this->MsgTxt?></div>
<?php } else {?>
<h2>Propriétés baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Bât.</th>
<th>Ent.</th>
<th>Niv.</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'local') {?>
<tr>
<td><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=$p->Batiment?></td>
<td><?=$p->Ent?></td>
<td><?=$p->Niveau?></td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<h2>Propriétés non baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'parcelle') {?>
<tr>
<td><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="7" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
</div>

View File

@ -46,9 +46,9 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Isin']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capitalisation']);
echo $this->partial('identite/fiche-item.phtml', $this->logo);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRC']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRM']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Groupe']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreId']);
//echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRM']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Actif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationJuridique']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Situation']);
@ -122,6 +122,7 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Mail']);
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEn']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEt']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteArtisanale']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Naf4']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Nace']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NatureActivite']);

View File

@ -52,7 +52,7 @@ span.poste input { width:50px; }
?>
</div>
<div id="saveMsg" style="text-align:center;width:100%;height:30px;clear:both;"></div>
<?php if ( $this->infos == 'NEW' ) {?>
<?php if ( $this->infos != 'NEW' ) {?>
<input type="hidden" name="originalDateCloture" value="<?=$this->dateCloture?>"/>
<input type="hidden" name="originalTypeBilan" value="<?=$this->typeBilan?>"/>
<?php }?>

View File

@ -43,6 +43,9 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
$layout->setLayout('layout');
$layout->setLayoutPath($layoutPath);
// DNS Prefetch
$view->headLink(array('rel'=>'dns-prefetch', 'href'=> '//'.$request->getHttpHost()));
//Load default style and javascript files for the selected theme
switch ( $theme ) {
case 'default':
@ -56,21 +59,21 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
->appendHttpEquiv('Content-Language', 'fr-FR');
//Favicon - Touch icon for iOS 2.0+ and Android 2.1+
$view->headLink()->headLink(array(
$view->headLink(array(
'rel' => 'apple-touch-icon-precomposed',
'href' => '/favicon-152.png'
));
//Favicon - targeted to any additional png size
$view->headLink()->headLink(array(
$view->headLink(array(
'rel' => 'icon',
'type' => 'image/png',
'href' => '/favicon-32.png'
));
$view->headLink()->headLink(array(
$view->headLink(array(
'rel' => 'shortcut icon',
'type' => 'image/x-icon',
'href' => '/favicon.ico')
);
'href' => '/favicon.ico'
));
$UserLogin = false;
if ( $module == 'auth' ) {

View File

@ -145,8 +145,9 @@ class IdentiteEntreprise
public function getNumRMLabel()
{
if ( !empty($this->identite->NumRM) )
if ( !empty($this->identite->NumRM) ) {
return 'Répertoire des métiers';
}
}
public function getNumRMTexte()
@ -879,6 +880,20 @@ class IdentiteEntreprise
return $this->identite->NafEtab .' : '. $this->identite->NafEtabLib;
}
public function getActiviteArtisanaleLabel()
{
return 'Activit&eacute; Artisanale';
}
public function getActiviteArtisanaleTexte()
{
if ($this->identite->Nafa!='') {
$data = $this->identite->NafaLib . ' ('.$this->identite->Nafa.')';
return $data;
}
return false;
}
public function getNaf4Label()
{
return 'Anciens codes NAF';

View File

@ -384,6 +384,11 @@ class Scores_Menu
'action' => 'enquetec',
'permission' => 'ENQUETEC',
),
array(
'label' => "Patrimoine",
'controller' => 'evaluation',
'action' => 'cadastre',
),
),
),
array(

View File

@ -121,13 +121,8 @@ class Scores_Ws_Client extends Zend_Soap_Client
$this->setOptions($options);
// --- Create Cache
$frontend = array(
'lifetime' => 14400,
'automatic_seralization' => true
);
$backend = array(
'cache_dir' => $c->profil->path->shared . '/temp/cache',
);
$frontend = array( 'lifetime' => 14400, 'automatic_seralization' => true );
$backend = array( 'cache_dir' => $c->profil->path->shared . '/temp/cache' );
$this->cache = Zend_Cache::factory('Core', 'File', $frontend, $backend);
}
@ -205,7 +200,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Logging
if ( array_key_exists('log', $methodConfig) ) {
// --- Envoi email de contexte
if( $methodConfig['log'] == 'mail' ) {
if( $methodConfig['log'] == 'mail' && in_array(APPLICATION_ENV, array('production', 'staging')) ) {
$message = '';
$message.= 'Erreur SOAP - Code : '.$fault->faultcode.' - Message : '.$fault->faultstring;
$message.= ' - Utilisateur : '.$this->getHttpLogin();

View File

@ -4,30 +4,40 @@ return array(
'getGreffeAffaireList' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
),
'getGreffeAffaireDetail' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
),
'getIdentite' => array(
'debug' => true,
'log' => 'mail',
),
'getPrivilegeDetail' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
),
'getPrivilegeList' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
),
'getRNVP' => array(
'debug' => true,
'log' => 'mail',
),
),
'0.8' => array(
'getSurveillances' => array(
'debug' => true,
),
'getCadastrePatrimoine' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
)
),
);

View File

@ -1,72 +1,154 @@
<?php
return array(
'0.3' => array(
'getCategory' => null,
'getClientTarif' => null,
'getClientTarifs' => null,
'getEmail' => null,
'getCategory' => array(
'log' => 'mail',
),
'getClientTarif' => array(
'log' => 'mail',
),
'getClientTarifs' => array(
'log' => 'mail',
),
'getEmail' => array(
'log' => 'mail',
),
'getInfosLogin' => array(
'debug' => true,
'errorMsg' => array('ERR'),
'log' => 'mail',
),
'getListeClients' => null,
'getListeDroits' => null,
'getListePrefs' => null,
'getListeUtilisateurs' => null,
'getLogs' => null,
'getLogsClients' => null,
'getNextLogin' => null,
'getPrestation' => null,
'getPrestations' => null,
'getService' => null,
'getServiceUsers' => null,
'getServices' => null,
'getUser' => null,
'searchLogin' => null,
'setCGU' => null,
'setClient' => null,
'setClientTarif' => null,
'setEmail' => null,
'setInfosLogin' => null,
'setParam' => null,
'setPrestation' => null,
'setService' => null,
'setSurveillancesMail' => null,
'setUserService' => null,
'getListeClients' => array(
'log' => 'mail',
),
'getListeDroits' => array(
'log' => 'mail',
),
'getListePrefs' => array(
'log' => 'mail',
),
'getListeUtilisateurs' => array(
'log' => 'mail',
),
'getLogs' => array(
'log' => 'mail',
),
'getLogsClients' => array(
'log' => 'mail',
),
'getNextLogin' => array(
'log' => 'mail',
),
'getPrestation' => array(
'log' => 'mail',
),
'getPrestations' => array(
'log' => 'mail',
),
'getService' => array(
'log' => 'mail',
),
'getServiceUsers' => array(
'log' => 'mail',
),
'getServices' => array(
'log' => 'mail',
),
'getUser' => array(
'log' => 'mail',
),
'searchLogin' => array(
'log' => 'mail',
),
'setCGU' => array(
'log' => 'mail',
),
'setClient' => array(
'log' => 'mail',
),
'setClientTarif' => array(
'log' => 'mail',
),
'setEmail' => array(
'log' => 'mail',
),
'setInfosLogin' => array(
'log' => 'mail',
),
'setParam' => array(
'log' => 'mail',
),
'setPrestation' => array(
'log' => 'mail',
),
'setService' => array(
'log' => 'mail',
),
'setSurveillancesMail' => array(
'log' => 'mail',
),
'setUserService' => array(
'log' => 'mail',
),
),
'0.4' => array(
'getCategory' => null,
'getAccess' => null,
'getClient' => null,
'getClientServices' => null,
'getClients' => null,
'getCategory' => array(
'log' => 'mail',
),
'getClient' => array(
'log' => 'mail',
),
'getClientServices' => array(
'log' => 'mail',
),
'getClients' => array(
'log' => 'mail',
),
'getService' => array(
'debug' => true,
'log' => 'mail',
),
'getServiceList' => array(
'debug' => true,
'getServices' => array(
'log' => 'mail',
),
'getUser' => null,
'getUserEmail' => null,
'getUserHistory' => array(
'debug' => true,
'getUser' => array(
'log' => 'mail',
),
'getUserList' => array(
'debug' => true,
'getUserEmail' => array(
'log' => 'mail',
),
'getUsers' => array(
'log' => 'mail',
),
'loginAuthenticate' => array(
'log' => 'mail',
),
'setCGU' => array(
'log' => 'mail',
),
'setService' => array(
'log' => 'mail',
),
'setServiceParam' => array(
'log' => 'mail',
),
'setUser' => array(
'log' => 'mail',
),
'setUserEmail' => array(
'log' => 'mail',
),
'setUserPassword' => array(
'log' => 'mail',
),
'loginAuthenticate' => null,
'setCGU' => null,
'setService' => null,
'setServiceParam' => null,
'setUser' => null,
'setUserEmail' => null,
'setUserPassword' => null,
'setUserSSO' => array(
'debug' => true,
'errorMsg' => array('SSO'),
'log' => 'mail',
),
'ssoAuthenticate' => array(
'debug' => true,
'errorMsg' => array('SSO'),
'log' => 'mail',
),
),
);

View File

@ -6,12 +6,15 @@ return array(
),
'getRncsEven' => array(
'debug' => true,
'log' => 'mail',
),
'getRncsJugement' => array(
'debug' => true,
'log' => 'mail',
),
'getListeFichierSurv' => array(
'debug' => true,
'log' => 'mail',
)
),
);

View File

@ -1,13 +1,24 @@
<?php
return array(
'0.1' => array(
'getActeList' => null,
'getBilanList' => null,
'getBilanInputList' => null,
'getKbisList' => null,
'getActeList' => array(
'log' => 'mail',
),
'getBilanList' => array(
'log' => 'mail',
),
'getBilanInputList' => array(
'log' => 'mail',
),
'getKbisList' => array(
'log' => 'mail',
),
'setBilanInput' => array(
'debug' => true,
'log' => 'mail',
),
'setBilanInputFile' => null,
)
'setBilanInputFile' => array(
'log' => 'mail',
),
),
);

View File

@ -3,14 +3,19 @@ return array(
'0.1' => array(
'setAssoStatut' => array(
'debug' => true,
'log' => 'mail',
),
'setPrivileges' => array(
'debug' => true,
'errorMsg' => array('0902'),
'log' => 'mail',
),
'getAssoActes' => array(
'debug' => true,
'log' => 'mail',
),
'getAssoActe' => array(
'log' => 'mail',
),
'getAssoActe' => array(),
)
);

View File

@ -3,6 +3,7 @@ return array(
'0.2' => array(
'setGeoCode' => array(
'debug' => true,
'log' => 'mail',
),
)
);