From d35bbc79d72d4fd273839f6be5e6b9142f00b24a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Jun 2008 10:19:27 +0000 Subject: [PATCH] We must add the constant STOCK_USE_WAREHOUSE_BY_USER to have the page with warehouse by users shown. This is because this feature is not working yet because there is no way to edit the table llx_user_entrepot. Only reading of this table is possible. So the page that show contant of this table is not active by default in standard release. --- htdocs/product/stock/fiche-valo.php | 19 +++++++++++-------- htdocs/product/stock/fiche.php | 19 +++++++++++-------- htdocs/product/stock/info.php | 21 ++++++++++++--------- htdocs/product/stock/mouvement.php | 14 ++++++++++---- htdocs/product/stock/user.php | 12 +++++------- 5 files changed, 49 insertions(+), 36 deletions(-) diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index c0ccc4dcef4..1d8be40d8f2 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -1,5 +1,6 @@ + * Copyright (C) 2008 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 @@ -14,16 +15,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/product/stock/fiche.php \ingroup stock \brief Page fiche de valorisation du stock dans l'entrepot - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -68,10 +66,15 @@ if ($_GET["id"]) $hselected=$h; $h++; - $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; - $head[$h][1] = $langs->trans("Users"); - $h++; - + if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER) + { + // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature. + // Should not be enabled by defaut because does not work yet correctly because + // there is no way to add values in the table llx_user_entrepot + $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; + $head[$h][1] = $langs->trans("Users"); + $h++; + } $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][1] = $langs->trans("Info"); $h++; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 89d4a94848a..77fe112d5bd 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Simon Tosser * Copyright (C) 2005-2006 Regis Houssin * @@ -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/product/stock/fiche.php \ingroup stock \brief Page fiche entrepot - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -225,9 +222,15 @@ else $head[$h][1] = $langs->trans("EnhancedValue"); $h++; - $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; - $head[$h][1] = $langs->trans("Users"); - $h++; + if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER) + { + // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature. + // Should not be enabled by defaut because does not work yet correctly because + // there is no way to add values in the table llx_user_entrepot + $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; + $head[$h][1] = $langs->trans("Users"); + $h++; + } $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][1] = $langs->trans("Info"); diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index f6fa8afa4d6..3aa9cc42e8c 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2008 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 @@ -14,16 +14,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/product/stock/info.php \ingroup facture \brief Page des informations d'un entrepot - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -60,10 +57,16 @@ $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche-valo.php?id='.$entrepot->id; $head[$h][1] = $langs->trans("EnhancedValue"); $h++; -$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; -$head[$h][1] = $langs->trans("Users"); -$h++; - + if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER) + { + // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature. + // Should not be enabled by defaut because does not work yet correctly because + // there is no way to add values in the table llx_user_entrepot + $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; + $head[$h][1] = $langs->trans("Users"); + $h++; + } + $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][1] = $langs->trans("Info"); $hselected=$h; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 58caadcc9d5..6a9005dc8c9 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -102,10 +102,16 @@ if ($resql) $head[$h][1] = $langs->trans("EnhancedValue"); $h++; - $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; - $head[$h][1] = $langs->trans("Users"); - $h++; - + if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER) + { + // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature. + // Should not be enabled by defaut because does not work yet correctly because + // there is no way to add values in the table llx_user_entrepot + $head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; + $head[$h][1] = $langs->trans("Users"); + $h++; + } + $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][1] = $langs->trans("Info"); $h++; diff --git a/htdocs/product/stock/user.php b/htdocs/product/stock/user.php index f0549213681..07cc50dc355 100644 --- a/htdocs/product/stock/user.php +++ b/htdocs/product/stock/user.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Simon Tosser * Copyright (C) 2005-2006 Regis Houssin * @@ -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/product/stock/user.php \ingroup stock - \brief Fiche gestion des utilisateurs des entrepots - \version $Revision$ + \brief Page to link dolibarr users with warehouses + \version $Id$ */ require("./pre.inc.php"); @@ -144,7 +141,8 @@ $form=new Form($db); print "
\n"; print "
"; - + + /* ************************************************************************** */ /* */ /* Affichage des utilisateurs de l'entrepot */