This commit is contained in:
Michael RICOIS 2013-01-30 09:58:51 +00:00
parent 1b0c20c4ed
commit acba8987d2

View File

@ -64,8 +64,10 @@ $db->setFetchMode(Zend_Db::FETCH_OBJ);
if ( isset($opts->reprise) )
{
$commandesM = new Application_Model_CommandesErreur();
$sql = $commandesM->select()->where("erreur!='' AND dateCommande > DATE_SUB(NOW(),INTERVAL 120 HOUR)");
$timestamp = mktime(0, 0, 0, date("m"), date("d")-5, date("Y"));
$daybefore = date('Y-m-d', $timestamp);
$commandesM = new Application_Model_CommandesErreur();
$sql = $commandesM->select()->where("erreur!='' AND dateReception=='0000-00-00 00:00:00' AND dateCommande > '".$daybefore." 00:00:00'");
$repErreur = $commandesM->fetchAll($sql);
if (count($repErreur)==0) exit;