diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 8dac87b1c13..2b71daf8bed 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -20,10 +20,10 @@ */ /** - \file htdocs/admin/stock.php - \ingroup stock + \file htdocs/admin/stock.php + \ingroup stock \brief Page d'administration/configuration du module gestion de stock - \version $Revision$ + \version $Revision$ */ require("./pre.inc.php"); @@ -33,7 +33,6 @@ $langs->load("stocks"); if (!$user->admin) accessforbidden(); - /* * Actions */ @@ -49,6 +48,12 @@ elseif ($_POST["action"] == 'stock_userstock_autocreate') Header("Location: stock.php"); exit; } +elseif ($_POST["action"] == 'stock_bill') +{ + dolibarr_set_const($db, "STOCK_CALCULATE_ON_BILL", $_POST["stock_bill"]); + Header("Location: stock.php"); + exit; +} /* * Affiche page @@ -71,24 +76,17 @@ print " \n"; // sousproduits activation/desactivation $var=!$var; - print ""; - print ''.$langs->trans("UserWarehouse").''; print ''; print "
"; print ""; print $html->selectyesno("stock_userstock",$conf->global->STOCK_USERSTOCK,1); - print ''; -print '
'; -print ""; - -print ''; +print "\n\n\n"; if ($conf->global->STOCK_USERSTOCK == 1) { - // utilisation formulaire Ajax sur choix produit $var=!$var; print ""; @@ -104,6 +102,16 @@ if ($conf->global->STOCK_USERSTOCK == 1) print "\n"; print "\n"; } +$var=!$var; + +print ""; +print ''.$langs->trans("DeStockReStockOnBill").''; +print ''; +print "
"; +print ""; +print $html->selectyesno("stock_bill",$conf->global->STOCK_CALCULATE_ON_BILL,1); +print ''; +print "
\n\n\n"; print ''; $db->close();