Ajout option pour ne facturer qu'un seul contrat
This commit is contained in:
parent
b2a5efff6b
commit
a8634fd522
@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
require ("../../master.inc.php");
|
require ("../../master.inc.php");
|
||||||
|
|
||||||
$opt = getopt("l:");
|
$opt = getopt("l:c:");
|
||||||
|
|
||||||
$limit = $opt['l'];
|
$limit = $opt['l'];
|
||||||
|
$optcontrat = $opt['c'];
|
||||||
|
|
||||||
if (strlen($limit) == 0)
|
if (strlen($limit) == 0 && strlen($optcontrat) == 0)
|
||||||
{
|
{
|
||||||
print "Usage :\n php facturation-emission.php -l <limit>\n";
|
print "Usage :\n php facturation-emission.php -l <limit>\n";
|
||||||
exit;
|
exit;
|
||||||
@ -119,7 +120,15 @@ if (!$error)
|
|||||||
$sql .= " AND f.fk_ligne = l.rowid ";
|
$sql .= " AND f.fk_ligne = l.rowid ";
|
||||||
$sql .= " AND l.fk_contrat = c.rowid";
|
$sql .= " AND l.fk_contrat = c.rowid";
|
||||||
|
|
||||||
|
if (strlen($optcontrat) > 0)
|
||||||
|
{
|
||||||
|
$sql .= " AND c.rowid=".$optcontrat;
|
||||||
|
dolibarr_syslog("Limite sur le contrat : ".$optcontrat);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$sql .= " LIMIT $limit";
|
$sql .= " LIMIT $limit";
|
||||||
|
}
|
||||||
|
|
||||||
$contrats = array();
|
$contrats = array();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user