Merge from branch 2.4

This commit is contained in:
Michael RICOIS 2013-08-12 12:08:03 +00:00
parent cd99eb5db3
commit 57b17a329e
15 changed files with 3783 additions and 93 deletions

View File

@ -49,6 +49,7 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('idClient', $user->getIdClient());
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));

View File

@ -2301,12 +2301,12 @@ class SaisieController extends Zend_Controller_Action
$request = $this->getRequest();
$siren = $request->getParam('siren');
$refresh = 0;
$message = '';
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$params = $request->getParams();
$message = '';
$params = $request->getParams();
// check values one more time
$paramlist = array(
'siren' => 'Siren',
@ -2327,12 +2327,17 @@ class SaisieController extends Zend_Controller_Action
// end checking values
if ($message == '') {
$message = $ws->setScoreCutoff($params['siren'], $params['encours']*1000, $params['scoreSolv'], $params['scoreDir'], $params['scoreConf'], $params['remarque']);
$message = $ws->setScoreCutoff($params['siren'], $params['encours']*1000, $params['scoreSolv'], $params['scoreDir'], $params['scoreConf'], $params['remarque'], $params['delete']);
if (is_int($message)){
$message = "Cut-off mis à jour.";
$refresh = 1;
}
}
if ($message == '' && $params['delete'] == 1) {
$message = "Cut-off est supprimé. Aucun Cut-off est défini, merci de remplir toutes les valeurs";
$refresh = 1;
}
}
} else {
$this->view->assign('name', "Définir un Cut-off");
@ -2341,11 +2346,9 @@ class SaisieController extends Zend_Controller_Action
$getcutoff = json_decode($ws->getScoreCutoff($siren), true);
if(!$getcutoff) {
if ($request->getParam('delmessage', NULL)){
$message = $request->getParam('delmessage', NULL)."Aucun Cut-off est défini, merci de remplir toutes les valeurs";
$refresh = 1;
} else {
if ($message == '') {
$message = "Aucun Cut-off est défini, merci de remplir toutes les valeurs";
$refresh = 0;
}
$getcutoff = array(
@ -2366,26 +2369,4 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('message', $message);
$this->view->assign('refresh', $refresh);
}
/**
* Supprimer Cut-off
*/
public function scorecutoffdelAction()
{
$ws = new WsScores();
$message = '';
$request = $this->getRequest();
$siren = $request->getParam('siren');
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
if ( $request->isPost() && isset($siren)) {
$message = $ws->delScoreCutoff($siren);
if ($message){
$message = "Cut-off est supprimé. ";
}
}
}
$this->_redirect('/saisie/scorecutoff/siren/'.$siren.'/delmessage/'.$message);
}
}

View File

@ -85,9 +85,20 @@ table.data td { border:1px solid #ccc; padding:5px; }
?>
né(e) à <?=$dir->NaissVille?> &nbsp;(<?=$dir->NaissDepPays?>)
<?php } ?>
<img src="/themes/default/images/worldcheck/wc.png" />
<?php } ?>
</td>
<td><?php if($this->idClient==1) { ?>
<a class='wcheck' href="<?=$this->url(array(
'controller' => 'worldcheck',
'action' => 'index',
'dirNom' => $dir->Nom,
'dirPrenom' => $dir->Prenom,
'dirNaissJJ' => substr($dir->NaissDate,0,2),
'dirDateNaissMM' => substr($dir->NaissDate,3,2),
'dirDateNaissAAAA' => substr($dir->NaissDate,6,4),
'dirCpVille' => $dir->NaissVille))?>" title="WorldCheck" style="cursor: pointer;" >
<img src="/themes/default/images/worldcheck/wc.png" /></a>
<?php }?></td>
<td class="StyleInfoData" width="100" valign="top">
<?php if ($dir->Siren!='') {?>
<a title="Consulter la fiche identité" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren))?>">
@ -150,5 +161,16 @@ $('a.dialog').on('click', function(){
return false;
}
});
$('a.wcheck').qtip({
content: 'WorldCheck',
position: {
corner: {
target: 'topRight',
tooltip: 'topLeft'
}
}
});
</script>
<?php }?>

View File

@ -248,10 +248,19 @@ $('div#blocIdLocal').on('click', 'a.addIdLocal', function(e){
e.preventDefault();
var country = $('select[name=adresse_pays]').val();
AddSelectCountry(country, $(this).attr('href'));
$('.addIdLocal').hide();
$('.removeIdLocal').hide();
});
$('div#blocIdLocal').on('click', 'a.removeIdLocal', function(e){
e.preventDefault();
var prevId = $(this).attr('href')-1;
$('a#ad'+prevId).show();
$('a#rm'+prevId).show();
$(this).parent().parent().remove();
});
function AddSelectCountry(code, n){
if (!n) { n=1; }
if (!n) { n=1; } else {n++;}
if (n<=3){
var html = 'Aucun identifiant !';
$.getJSON('/saisie/countryid', {code: code}, function(data){
@ -261,8 +270,10 @@ function AddSelectCountry(code, n){
});
if (option!=''){
html = '<div class="fieldgrp"><label>Identifiant local</label>'+
'<div class="field"><input type="text" name="idLoc'+n+'Num"/>'+
'<select name="idLoc'+n+'Type">'+option+'</select><a href="'+n+'" class="addIdLocal">[+]</a></div></div>';
'<div class="field"><input size="35" type="text" name="idLoc'+n+'Num"/>'+
'<select name="idLoc'+n+'Type">'+option+'</select>';
if (n<3) { html = html+'<a href="'+n+'" class="addIdLocal" id="ad'+n+'">[+]</a>';}
html = html+'<a href="'+n+'" class="removeIdLocal" id="rm'+n+'">[-]</a></div></div>';
}
$('div#blocIdLocal').append(html);
});

View File

@ -81,6 +81,7 @@ $wdate = new WDate();
<div style="margin-top:5em">
<form>
<input type="hidden" name="siren" value="<?=$this->siren?>">
<input type="hidden" name="delete" value="0">
<div>
<label>Encours</label>
@ -117,8 +118,6 @@ foreach($select as $item => $val) {
</form>
</div>
<div id="confirm" title="Confirmation de suppression">Supprimer Cut-off ?</div>
<div class="loading"><center><img style="padding-top:25%" src="/themes/default/images/giant/19-1.gif" /></center></div>
<script type="text/javascript" src="/themes/default/scripts/scorecutoff.js" />

View File

@ -109,12 +109,15 @@ function survSubmit(){
function(data) { $('#frmSurv').append('<br/>'+data);
}, 'text');
});
$('#dialogsurv').dialog({ buttons: [
{ text: "Fermer", click: function() { window.location.href = windowhref; } }
]});
} else {
$('#frmSurv').replaceWith('<div id="frmSurv">Aucune source !</div>');
}
$('#dialogsurv').dialog({ buttons: [
{ text: "Fermer", click: function() { window.location.href = windowhref; } }
]});
$('#dialogsurv').dialog({ buttons: [
{ text: "Fermer", click: function() { window.location.href = windowhref; } }
]});
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -182,7 +182,7 @@ class RatiosGraph
$labelsY[] = $i;
}
$c = new XYChart(350, 250);
$c->setPlotArea(55, 10, 280, 200);
$c->setPlotArea(70, 10, 280, 200);
$c->yAxis->setTitle($data['unite']);
$c->xAxis->setTitle("Années");
$c->xAxis->setWidth(2);
@ -228,7 +228,7 @@ class RatiosGraph
}
# Create a XYChart object of size 250 x 250 pixels
$c = new XYChart(400, 250);
$c->setPlotArea(65, 10, 280, 200);
$c->setPlotArea(70, 10, 280, 200);
$c->yAxis->setTitle($unite);
$c->xAxis->setTitle("Années");
$c->xAxis->setWidth(2);
@ -291,7 +291,7 @@ class RatiosGraph
$c = new XYChart(665, 350, 0xcccccc, 0x000000, 1);
$c->addTitle("Synthèse *", "timesbi.ttf", 15, 0x000000);
$c->addText(60, 320, "* Elements financier rapportés à 12 mois" );
$c->setPlotArea(60, 80, 500, 200, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);
$c->setPlotArea(70, 80, 500, 200, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);
$c->yAxis->setTitle("KEUROS","timesbi.ttf",10);
$c->xAxis->setTitle( "<*block,valign=absmiddle*>Années<*/*>");
$c->xAxis->setWidth(2);

View File

@ -185,7 +185,7 @@ class GenCourrier
$odf->setVars('societe', $this->info->societe, true, 'UTF-8');
$odf->setVars('montant', $this->info->montant, true, 'UTF-8');
if ($this->info->type == 'MAIL') {
$odf->setVars('bymail',"ou à votre convenance par mail à : support@scores-decisions.com");
$odf->setVars('bymail',"ou à votre convenance par mail à : support@scores-decisions.com", true, 'UTF-8');
}
$odf->saveToDisk($this->path.$file);
@ -240,7 +240,7 @@ class GenCourrier
//Bloc Lieu, date
$date = date('d/m/Y');
$txt = "Rambouillet, le $date";
$positionY = $pdf->GetY()+8;
$positionY = $pdf->GetY()+5;
$pdf->MultiCell($largeur, 5, $txt, $border, 'L', 0, 1, $positionX, $positionY);
//Bloc objet
@ -284,7 +284,7 @@ class GenCourrier
if ($this->info->type == 'MAIL') {
$positionY = $pdf->GetY()+2;
$pdf->MultiCell(0, 5,
"ou à votre convenance par mail à : support@scores-decisions.com",
"ou à votre convenance par mail à : support@scores-decisions.com",
$border, 'L', 0, 1, '', $positionY, true);
}

View File

@ -27,6 +27,16 @@ Class GiantControllerLib
$Rapport = new Rapports($Pays, $TestIndication);
$CommandeP = new stdClass();
switch ($Utilisateur->getIdClient()) {
case '0':
$price = 0;
break;
case '1':
$price = 7;
break;
default:
$price = 10;
}
$id = $Rapport->getRapportExist($CompanyId, $Type, $Language);
if(empty($id)) {
$rapport = new GiantRechercheController($Pays, $TestIndication);
@ -44,7 +54,7 @@ Class GiantControllerLib
$CommandeP->login = $Utilisateur->getLogin();
$CommandeP->date = date("Y-m-d");
$CommandeP->typeReport = $function->getTypeReport($Type);
$CommandeP->price = 0;
$CommandeP->price = $price;
$CommandeP->pays = strtolower($Pays);
$CommandeP->rapportId = $report_id[0]['id'];
//$CommandeP->lang = $Utilisateur->getLang();
@ -58,7 +68,7 @@ Class GiantControllerLib
return ($id);
}
public function startmonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode,$Pays,$TestIndication,$CompanyName)
{
$Utilisateur = new Scores_Utilisateur();
@ -85,22 +95,22 @@ Class GiantControllerLib
} else {
$CommandeP->ActualEndDate = date('Y-m-d', strtotime('+6 month'));
}
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode);
$CommandeP->InternalOrderId = $result->Order->InternalOrderId;
$Commande->setMonitoring($CommandeP);
return ($result);
}
public function stopmonitoring($CompanyId, $PreferredEndDate,$InternalOrderId,$Pays,$TestIndication)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStopMonitoring($CompanyId, $PreferredEndDate,$InternalOrderId);
return ($result);
}
public function updatemonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode, $Pays,$TestIndication)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
@ -124,7 +134,7 @@ Class GiantControllerLib
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetRetriveMonitoring($CompanyId, $StartFrom,$InternalOrderId,$EventType);
return ($result);
}
}
protected function parcourTableau($array)
{
$tableau = array();
@ -310,8 +320,8 @@ Class GiantRechercheController extends GiantFunction
$result = $this->CreditData->getMethode('StopMonitoring', array($CompanyId, $PreferredEndDate, $InternalOrderId));
return ($result);
}
public function GetUpdateMonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);

View File

@ -20,7 +20,7 @@ class Scores_Utilisateur
* @param stdClass $InfosLogin
* @return stdClass
*/
protected function updateProfil($InfosLogin)
public function updateProfil($InfosLogin)
{
$identity = new stdClass;
$identity->username = $login;

View File

@ -279,9 +279,10 @@ class WsScores
* @param int $scoreDir
* @param int $scoreConf
* @param string $remarque
* @param boolean delete
* @return boolean
*/
public function setScoreCutoff($siren, $encours, $scoreSolv, $scoreDir, $scoreConf, $remarque)
public function setScoreCutoff($siren, $encours, $scoreSolv, $scoreDir, $scoreConf, $remarque, $delete)
{
$infos = array(
'siren' => $siren,
@ -293,6 +294,7 @@ class WsScores
);
$params = new stdClass();
$params->infos = json_encode($infos);
$params->delete = $delete;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setScoreCutoff($params);

File diff suppressed because one or more lines are too long

View File

@ -32,24 +32,6 @@ $('[required]').blur(function(){
validate();
});
$("#confirm").dialog({
autoOpen: false,
modal: true,
buttons : {
"Oui" : function() {
var siren = $('[name=siren]').serialize();
$(this).dialog("close");
loading();
$.post('/saisie/scorecutoffdel', siren, function(data) {
$('#dialog').html(data);
});
},
"Non" : function() {
$(this).dialog("close");
}
}
});
$('#dialog').dialog({ buttons: [
{ text: "Valider", click: function() {
var values = $(this).find('form').serialize();
@ -60,9 +42,35 @@ $('#dialog').dialog({ buttons: [
});
}
}},
{ text: "Supprimer",
click: function() {
$("#confirm").dialog("open");
{ text: "Supprimer", click: function() {
if (validate()) {
$('<div></div>').html('<div style="line-height:25px;">Supprimer Cut-off ?</div><div style="font-size:10px; color:#999;">Toutes les valeurs seront effacées.</div>')
.dialog({
modal: true,
title: 'Confirmation de suppression',
zIndex: 10000,
autoOpen: true,
width: '250',
resizable: false,
buttons: {
Oui: function () {
$('#dialog [name=delete]').val('1');
var values = $('#dialog').find('form').serialize();
$(this).dialog("close");
loading();
$.post('/saisie/scorecutoff', values, function(data) {
$('#dialog').html(data);
});
},
Non: function () {
$(this).dialog("close");
}
},
close: function (event, ui) {
$(this).remove();
}
});
}
}},
{ text: "Fermer", click: function() {
if($(".message p").attr('id')==1) {
@ -75,8 +83,8 @@ $('#dialog').dialog({ buttons: [
] });
if($('#dateInsert').text()!='') {
$(".ui-dialog-buttonpane button:contains('Supprimer')").hide(); // change to show() when webservice will be ready
$(".ui-dialog-buttonpane button:contains('Supprimer')").show();
}
else {
$(".ui-dialog-buttonpane button:contains('Supprimer')").hide();
}
}