From ce4079a5c993a072632ee121d95fb69d6f857cd5 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 4 Dec 2006 11:17:24 +0000 Subject: [PATCH] Nouveau fichier --- htdocs/admin/stock.php | 106 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 htdocs/admin/stock.php diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php new file mode 100644 index 00000000000..af5e58dfc79 --- /dev/null +++ b/htdocs/admin/stock.php @@ -0,0 +1,106 @@ + + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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/admin/stock.php + \ingroup stock + \brief Page d'administration/configuration du module gestion de stock + \version $Revision$ +*/ +require("./pre.inc.php"); + +$langs->load("admin"); + +if (!$user->admin) + accessforbidden(); + +if ($_POST["action"] == 'stock_userstock') +{ + dolibarr_set_const($db, "STOCK_USERSTOCK", $_POST["stock_userstock"]); + Header("Location: stock.php"); + exit; +} +elseif ($_POST["action"] == 'stock_userstock_autocreate') +{ + dolibarr_set_const($db, "STOCK_USERSTOCK_AUTOCREATE", $_POST["stock_userstock_autocreate"]); + Header("Location: stock.php"); + exit; +} +/* + * Affiche page + */ +llxHeader('',$langs->trans("StockSetup")); + +print_fiche_titre($langs->trans("StockSetup"),'','setup'); + +$html=new Form($db); +$var=true; +print ''; +print ''; +print " \n"; +print " \n"; +print " \n"; + +/* + * Formulaire parametres divers + */ +// sousproduits activation/desactivation +$var=!$var; + + +print ""; + +print ''; +print '"; + +print ''; + +if ($conf->global->STOCK_USERSTOCK == 1) +{ + // utilisation formulaire Ajax sur choix produit + $var=!$var; + + print ""; + print ''; + + print '\n"; + print "\n"; +} + +print '
".$langs->trans("Parameters")."".$langs->trans("Value")."
'.$langs->trans("UserWarehouse").''; +print "
"; +print ""; +print $html->selectyesno("stock_userstock",$conf->global->STOCK_USERSTOCK,1); + +print ''; +print '
'; +print "
'.$langs->trans("UserWarehouseAutoCreate").''; + print "
"; + print ""; + print $html->selectyesno("stock_userstock_autocreate",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1); + + print ''; + print '
'; + print "
'; +$db->close(); + +llxFooter(); +?>