diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 63fe49da3dd..6fc116e70f5 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ */ require("./pre.inc.php"); +require_once(DOL_DOCUMENT_ROOT ."/notify.class.php"); if (!$user->rights->commande->lire) accessforbidden(); @@ -42,6 +43,8 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } +$commandestatic=new Commande($db); + llxHeader("",$langs->trans("Orders"),"Commande"); @@ -143,7 +146,7 @@ print ''; /* * Commandes en cours */ -$sql = "SELECT c.rowid, c.ref, s.nom, s.idp"; +$sql = "SELECT c.rowid, c.ref, c.fk_statut, 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"; @@ -156,7 +159,7 @@ if ( $db->query($sql) ) { print ''; print ''; - print ''; + print ''; $num = $db->num_rows(); if ($num) @@ -169,7 +172,9 @@ if ( $db->query($sql) ) $obj = $db->fetch_object(); print "'; - print ''; + print ''; + print ''; + print ''; $i++; } } @@ -181,7 +186,7 @@ if ( $db->query($sql) ) */ $max=5; -$sql = "SELECT c.rowid, c.ref, s.nom, s.idp,"; +$sql = "SELECT c.rowid, c.ref, c.fk_statut, 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"; @@ -197,7 +202,7 @@ if ($resql) { print '
'.$langs->trans("OnProcessOrders").' ('.$num.')
'.$langs->trans("OnProcessOrders").' ('.$num.')
rowid\">".img_object($langs->trans("ShowOrder"),"order").' '; print $obj->ref.''.$obj->nom.'
'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.$commandestatic->LibStatut($obj->fk_statut,5).'
'; print ''; - print ''; + print ''; $num = $db->num_rows($resql); if ($num) @@ -212,6 +217,7 @@ if ($resql) print $obj->ref.''; print ''; print ''; + print ''; print ''; $i++; }
'.$langs->trans("LastClosedOrders",$max).'
'.$langs->trans("LastClosedOrders",$max).'
'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.''.dolibarr_print_date($obj->datec).''.$commandestatic->LibStatut($obj->fk_statut,5).'