From 061a0963995dcd0915e72205af926b6694c7e20f Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 15 May 2006 12:22:07 +0000 Subject: [PATCH] Ajout des options month et year --- .../script/facturation-details-tableur.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/htdocs/telephonie/script/facturation-details-tableur.php b/htdocs/telephonie/script/facturation-details-tableur.php index 6f2118ff222..5ecf676cd8e 100644 --- a/htdocs/telephonie/script/facturation-details-tableur.php +++ b/htdocs/telephonie/script/facturation-details-tableur.php @@ -47,7 +47,6 @@ $resql = $db->query($sql); if ( $resql) { - $row = $db->fetch_row($resql); $year = substr($row[0],0,4); @@ -57,7 +56,22 @@ else { $error++; } - + +//loop through our arguments and see what the user selected +for ($i = 1; $i < sizeof($GLOBALS["argv"]); $i++) +{ + switch($GLOBALS["argv"][$i]) + { + case "--month": + $month = $GLOBALS["argv"][$i+1]; + break; + case "--year": + $year = $GLOBALS["argv"][$i+1]; + break; + } +} + + dolibarr_syslog("Mois $month Année $year"); /*