Correction
This commit is contained in:
parent
3fe1ffa0e6
commit
577120979f
@ -260,13 +260,23 @@ class EnrichissementController extends Zend_Controller_Action
|
|||||||
} else {
|
} else {
|
||||||
//Nombre de fichier dépassés
|
//Nombre de fichier dépassés
|
||||||
$dateBegin = $user->dateContrat;
|
$dateBegin = $user->dateContrat;
|
||||||
$dateEnd = date('YmdHis', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
|
$dateEnd = date('Y-m-d H:i:s', mktime(0,0,0,substr($user->dateContrat,5,2)+$user->periodContrat, substr($user->dateContrat,8,2), substr($user->dateContrat,0,4)));
|
||||||
|
try {
|
||||||
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
|
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
|
||||||
$sql = $commandesM->select()
|
$sql = $commandesM->select()->setIntegrityCheck(false)
|
||||||
|
->from( array('commande' => 'enrichissement_identifiants'), array('id'))
|
||||||
|
->join( array('critere' => 'ciblage_criteres'), 'critere.id = commande.idCriteres', array())
|
||||||
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
|
->where("dateAdded BETWEEN '".$dateBegin."' AND '".$dateEnd."'")
|
||||||
->where('idClient = ?', $user->idClient);
|
->where('idClient = ?', $user->idClient);
|
||||||
$result = $commandesM->fetchAll($sql);
|
$result = $commandesM->fetchAll($sql);
|
||||||
|
} catch (Zend_Db_Exception $e) {
|
||||||
|
echo "Erreur."; /*echo $sql->__toString();*/ exit;
|
||||||
|
}
|
||||||
|
if ( count($result)+1 > $user->limitFiles) {
|
||||||
|
$this->view->assign('resultatOver', 'files');
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $commandesM->fetchAll($sql);
|
||||||
if ( $result->count()+1 > $user->limitFiles) {
|
if ( $result->count()+1 > $user->limitFiles) {
|
||||||
$this->view->assign('resultatOver', 'files');
|
$this->view->assign('resultatOver', 'files');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user