diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 34282d4720d..12ea90bddf0 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -17,16 +17,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/fourn/commande/fiche.php \ingroup commande \brief Fiche de ventilation des commandes fournisseurs - \version $Revision$ + \version $Id$ */ require('./pre.inc.php'); @@ -85,15 +82,16 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece exit; } + + +/* + * View + */ + llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur"); $html = new Form($db); -/* *************************************************************************** */ -/* */ -/* Mode vue et edition */ -/* */ -/* *************************************************************************** */ $id = $_GET['id']; if ($id > 0) @@ -184,7 +182,7 @@ if ($id > 0) /* * Lignes de commandes */ - if ($commande->statut == 3 || $commande->statut == 4) + if ($commande->statut == 3 || $commande->statut == 4 || $commande->statut == 5) { print '
'; print ''; @@ -232,10 +230,9 @@ if ($id > 0) print "\n"; } - $var=false; - $entrepot = new Entrepot($db); + $var=true; while ($i < $num) { $objp = $db->fetch_object($resql); @@ -243,7 +240,7 @@ if ($id > 0) if ($objp->fk_product) { $var=!$var; - print ""; + print ""; print ''; print ''.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.''; print ' - '.$objp->label; @@ -281,10 +278,12 @@ if ($id > 0) } print "\n"; - print '
'; - } print "
\n"; - print ''; + print '
'; + } + + print "
\n"; + print '
'; $sql = "SELECT p.ref,cfd.fk_product, cfd.qty"; diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index b68cd8fe870..5129526dacd 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -829,7 +829,7 @@ class CommandeFournisseur extends Commande dolibarr_syslog("CommandeFournisseur::DispatchProduct"); - if ( ($this->statut == 3 || $this->statut == 4) && $qty > 0) + if ( ($this->statut == 3 || $this->statut == 4 || $this->statut == 5) && $qty > 0) { $this->db->begin();