Correction

This commit is contained in:
Michael RICOIS 2014-10-27 13:49:41 +00:00
parent 36d02b458f
commit b5473a80f4

View File

@ -260,12 +260,22 @@ class EnrichissementController extends Zend_Controller_Action
} else {
//Nombre de fichier dépassés
$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)));
$commandesM = new Application_Model_CiblageEnrichissementIdentifiants();
$sql = $commandesM->select()
$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();
$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('idClient = ?', $user->idClient);
$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) {
$this->view->assign('resultatOver', 'files');