Ajout de la fonction de parametrage des dates en entrées

This commit is contained in:
Damien LASSERRE 2011-12-15 09:38:10 +00:00
parent 32a3d78961
commit e5297f917d

View File

@ -1,4 +1,5 @@
<?php
require_once('commons/dates.php');
class SessionCiblage
{
protected $criteres = array('siege', 'adr_cp', 'adr_dep', 'adr_com', 'tel', 'fax', 'cj', 'capital', 'ape_etab', 'ape_entrep', 'age_entrep',
@ -29,7 +30,18 @@ class SessionCiblage
public function setCritere($key, $value)
{
if(in_array($key, $this->criteres)) {
switch($key) {
case 'dateCrea_etab':
case 'dateCrea_ent':
case 'dateImmat':
$Date = new WDate();
$this->valeur[$key] = $Date->dateT('d/m/Y', 'Ymd', $value);
break;
default:
$this->valeur[$key] = $value;
break;
}
$this->setSession();
}
}