diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 5b1833ae50e7ce3d862606fee5973133cd42439b..ea165fe739c7d4016285cc8bcb807af49df43ab5 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -504,7 +504,6 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs)) if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ' WHERE c.fk_soc = s.rowid'; - // Which invoice to show /* if ($viewstatut <> '') { @@ -527,6 +526,8 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs)) } } */ + + // Which invoice to show $sql.= " AND c.fk_statut in (1, 2) AND c.facture = 0"; $sql.= ' AND s.entity = '.$conf->entity;