simplification du code
This commit is contained in:
parent
780bf6b929
commit
d05bd5e400
@ -92,25 +92,21 @@ if ($socid)
|
||||
{
|
||||
$sql .= ' AND s.idp = '.$socid;
|
||||
}
|
||||
if ($viewstatut <> '' && $viewstatut < 4)
|
||||
if ($viewstatut <> '')
|
||||
{
|
||||
if ($viewstatut == 3)
|
||||
if ($viewstatut < 4)
|
||||
{
|
||||
$sql .= ' AND c.fk_statut ='.$viewstatut.' AND c.facture = 0';
|
||||
$sql .= ' AND c.fk_statut ='.$viewstatut; // brouillon, validée, en cours, annulée
|
||||
if ($viewstatut == 3)
|
||||
{
|
||||
$sql .= ' AND c.facture = 0'; // à facturer
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ($viewstatut == 4)
|
||||
{
|
||||
$sql .= ' AND c.fk_statut ='.$viewstatut;
|
||||
$sql .= ' AND c.facture = 1'; // facturée
|
||||
}
|
||||
}
|
||||
if ($viewstatut <> '' && $viewstatut == 4)
|
||||
{
|
||||
$sql .= ' AND c.facture = 1';
|
||||
}
|
||||
else if (isset($_GET['afacturer']) && $_GET['afacturer'] == 1)
|
||||
{
|
||||
$sql .= ' AND c.facture = 0';
|
||||
}
|
||||
if ($_GET['month'] > 0)
|
||||
{
|
||||
$sql .= " AND date_format(c.date_commande, '%Y-%m') = '$year-$month'";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user