diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 6fc116e70f5..4ca503e08ea 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -22,8 +22,8 @@
/**
\file htdocs/commande/index.php
- \ingroup compta
- \brief Page acceuil zone comptabilité
+ \ingroup commande
+ \brief Page acceuil espace commandes
\version $Revision$
*/
@@ -70,7 +70,7 @@ print "
\n";
/*
- * Commandes ŕ valider
+ * Commandes brouillons
*/
$sql = "SELECT c.rowid, c.ref, s.nom, s.idp";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user";
@@ -146,7 +146,7 @@ print '
';
/*
* Commandes en cours
*/
-$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.idp";
+$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.idp";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -173,7 +173,7 @@ if ( $db->query($sql) )
print " | | rowid\">".img_object($langs->trans("ShowOrder"),"order").' ';
print $obj->ref.' | ';
print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
- print ''.$commandestatic->LibStatut($obj->fk_statut,5).' | ';
+ print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).' | ';
print '
';
$i++;
}
@@ -186,7 +186,7 @@ if ( $db->query($sql) )
*/
$max=5;
-$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.idp,";
+$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.idp,";
$sql.= " ".$db->pdate("date_cloture")." as datec";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
@@ -217,7 +217,7 @@ if ($resql)
print $obj->ref.'';
print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.' | ';
print ''.dolibarr_print_date($obj->datec).' | ';
- print ''.$commandestatic->LibStatut($obj->fk_statut,5).' | ';
+ print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).' | ';
print '';
$i++;
}