From ce34dba52a172cf50a6b5881d10e835ee836f1f5 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 17 Nov 2003 17:01:37 +0000 Subject: [PATCH] Ajout filtre sur les entrepots ouverts dans les alertes de seuils --- htdocs/expedition/commande.php | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index a1f4357c9a3..c85d7b038c8 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -41,7 +41,7 @@ if ($user->societe_id > 0) * */ -if ($HTTP_POST_VARS["action"] == 'confirm_valid' && $HTTP_POST_VARS["confirm"] == yes && $user->rights->commande->valider) +if ($HTTP_POST_VARS["action"] == 'confirm_cloture' && $HTTP_POST_VARS["confirm"] == yes) { $commande = new Commande($db); $commande->fetch($_GET["id"]); @@ -76,6 +76,22 @@ if ($id > 0) /* * Commande */ + + + /* + * Confirmation de la validation + * + */ + if ($_GET["action"] == 'cloture') + { + $html->form_confirm("$PHP_SELF?id=$id","Cloturer la commande","Etes-vous sûr de cloturer cette commande ?","confirm_cloture"); + } + + + /* + * + */ + print '
'; print ''; print ''; @@ -213,6 +229,12 @@ if ($id > 0) print ''; $html->select_array("entrepot_id",$entrepot->list_array()); print ''; + + print 'Méthode'; + print ''; + $html->select_array("entrepot_id",$entrepot->list_array()); + print ''; + print ''; } print ""; @@ -232,7 +254,7 @@ if ($id > 0) $sql = "SELECT e.label as entrepot, ps.reel, p.label "; $sql .= " FROM llx_entrepot as e, llx_product_stock as ps, llx_product as p"; $sql .= " WHERE e.rowid = ps.fk_entrepot AND ps.fk_product = p.rowid AND ps.fk_product = $key"; - $sql .= " AND reel < $value"; + $sql .= " AND e.statut = 1 AND reel < $value"; $result = $db->query($sql); if ($result) @@ -266,7 +288,7 @@ if ($id > 0) print '-'; print '-'; - if ($user->rights->expedition->valider && $reste_a_livrer_total == 0) + if ($user->rights->expedition->valider && $reste_a_livrer_total == 0 && $commande->statut < 3) { print 'Clôturer'; }