Création de la fonction de recupération des enrichissement / Comptage
This commit is contained in:
parent
e2c64172fb
commit
26fdd036c4
@ -24,7 +24,6 @@ class ComptageController extends Zend_Controller_Action
|
||||
$session = new SessionCiblage();
|
||||
$session->clearCiblage();
|
||||
unset($erreurs->erreurs);
|
||||
$this->_redirect('./');
|
||||
}
|
||||
|
||||
public function savedialogAction()
|
||||
@ -82,11 +81,11 @@ class ComptageController extends Zend_Controller_Action
|
||||
//Retour comptage, unité Insee
|
||||
$result = array(
|
||||
'resultat' => number_format($data['resultat'], 0, '', ' '),
|
||||
'uniteInsee' => number_format($data['dateAjout'], 0, '', ' '),
|
||||
'uniteInsee' => number_format($data['uniteInsee'], 0, '', ' '),
|
||||
'dateAjout' => substr($data['dateAjout'],6,2).'/'.substr($data['dateAjout'],4,2).'/'.substr($data['dateAjout'],6,2)
|
||||
.' '.substr($data['dateAjout'],8,2).':'.substr($data['dateAjout'],10,2).':'.substr($data['dateAjout'],12,2),
|
||||
);
|
||||
$this->view->assign('result', $result);
|
||||
$this->view->result = $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -74,14 +74,10 @@ class EnrichissementController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$idCriteres = $request->getParam('id', null);
|
||||
$idProfil = $request->getParam('profil', null);
|
||||
|
||||
$comptage = new Table_Comptages();
|
||||
$sql = $comptage->select()->where('idDefinition = ?', $idCriteres);
|
||||
$result = $comptage->fetchRow($sql);
|
||||
$idComptage = $result['idDefinition'];
|
||||
|
||||
|
||||
//Vérifier les profils du client
|
||||
if ( $idProfil===null ){
|
||||
|
||||
//Selection du profil du client
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$user = $auth->getIdentity();
|
||||
@ -96,6 +92,11 @@ class EnrichissementController extends Zend_Controller_Action
|
||||
$idProfil = $profil->id;
|
||||
}
|
||||
|
||||
/*$comptage = new Table_Comptages();
|
||||
$sql = $comptage->select()->where('idDefinition = ?', $idCriteres);
|
||||
$result = $comptage->fetchRow($sql);
|
||||
$idComptage = $result['idDefinition'];*/
|
||||
|
||||
//Récupération des critères du ciblage
|
||||
$criteresM = new Table_Criteres();
|
||||
$criteresRow = $criteresM->find($idCriteres);
|
||||
@ -122,7 +123,7 @@ class EnrichissementController extends Zend_Controller_Action
|
||||
'idProfil' => $idProfil,
|
||||
'fichier' => '',
|
||||
'nbLigneTotales' => count($infosExtraction),
|
||||
'nbLigneTraites' => count($infosExtraction),
|
||||
'nbLigneTraites' => 0,
|
||||
'uniteInsee' => $ciblage->calculRedevanceInsee(),
|
||||
'error' => '',
|
||||
'dateAdded' => date('YmdHis'),
|
||||
|
@ -19,7 +19,7 @@ Enrichissement à partir d'un ciblage
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->encours as $item):?>
|
||||
<?php $i=0; foreach($this->encours as $item):?>
|
||||
<tr>
|
||||
<td><?=$item['reference']?></td>
|
||||
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
|
||||
|
@ -103,10 +103,11 @@ class SessionCiblage
|
||||
require_once('Field.php');
|
||||
$fields = new Fields(null);
|
||||
$reference = $fields->getByFamille($famille);
|
||||
echo '<pre>';print_r($this->valeur);
|
||||
foreach($this->valeur as $name => $valeur) {
|
||||
if(array_key_exists($name, $reference)) {
|
||||
unset($this->valeur[$name]);
|
||||
if($name != 'null') {
|
||||
if(array_key_exists($name, $reference)) {
|
||||
unset($this->valeur[$name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->setSession();
|
||||
|
@ -176,9 +176,9 @@ $(document).ready(function()
|
||||
data : $(this).serializeArray(),
|
||||
success: function(data) {
|
||||
set(null, null);
|
||||
window.location.replace('/');
|
||||
}
|
||||
});
|
||||
window.location.replace('/');
|
||||
});
|
||||
|
||||
$('.saveciblage').on('click', function(){
|
||||
|
Loading…
Reference in New Issue
Block a user