correction format date, issue #0000289
This commit is contained in:
parent
4e06bb4236
commit
317964b46f
@ -4,8 +4,7 @@
|
||||
* */
|
||||
|
||||
// Paramètres
|
||||
if ( ( $argc > 1 )
|
||||
|| in_array($argv[1], array('--help', '-help', '-h', '-?')) ) {
|
||||
if ( in_array($argv[1], array('--help', '-help', '-h', '-?')) ) {
|
||||
?>
|
||||
Liste les actes non envoyés du mois dernier
|
||||
Avec les options --help, -help, -h, et -?, vous obtiendrez cette aide.
|
||||
@ -23,13 +22,15 @@ require_once 'dbbootstrap.php';
|
||||
require_once 'mail/mail.php';
|
||||
|
||||
function listCmdMois($statut, $date){
|
||||
setDbConn('sdv1');
|
||||
$q = Doctrine_Query::create()
|
||||
->from('Commandes')
|
||||
->Where('typeCommande = ?', 'G')
|
||||
->andWhere('statutCommande = ?', $statut)
|
||||
->andWhere('dateCommande LIKE ?', $date.'%')
|
||||
->andWhere('dateReception = ?', '0000-00-00 00:00:00');
|
||||
|
||||
echo $q->getSqlQuery();
|
||||
print_r($q->getFlattenedParams());
|
||||
$listeCmd = $q->execute();
|
||||
return $listeCmd;
|
||||
}
|
||||
@ -39,7 +40,7 @@ if ( empty($argv[1]) ) {
|
||||
$timeMoisPrecedent = mktime(0, 0, 0, date('m')-1, 1, date('Y'));
|
||||
$moisPrecedent = date('Y-m', $timeMoisPrecedent);
|
||||
} else {
|
||||
$moisPrecedent = $argv[1];
|
||||
$moisPrecedent = substr($argv[1],0,4).'-'.substr($argv[1],4,2);
|
||||
}
|
||||
|
||||
$listeCmd = listCmdMois(0, $moisPrecedent);
|
||||
|
Loading…
Reference in New Issue
Block a user