Fix: Liens sur partie produits incorrect dans menu default
This commit is contained in:
parent
5c80c27f50
commit
2e776e7a89
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,7 +88,7 @@ function llxHeader($head = "", $title="", $addons='') {
|
|||||||
{
|
{
|
||||||
if ($user->rights->produit->lire)
|
if ($user->rights->produit->lire)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));
|
$menu->add(DOL_URL_ROOT."/product/", $langs->trans("Products"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,14 +65,14 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
|
|
||||||
$product->ref = stripslashes($_POST["ref"]);
|
$product->ref = $_POST["ref"];
|
||||||
$product->libelle = stripslashes($_POST["libelle"]);
|
$product->libelle = $_POST["libelle"];
|
||||||
$product->price = stripslashes($_POST["price"]);
|
$product->price = $_POST["price"];
|
||||||
$product->tva_tx = $_POST["tva_tx"];
|
$product->tva_tx = $_POST["tva_tx"];
|
||||||
$product->type = $_POST["type"];
|
$product->type = $_POST["type"];
|
||||||
$product->status = $_POST["statut"];
|
$product->status = $_POST["statut"];
|
||||||
$product->description = stripslashes($_POST["desc"]);
|
$product->description = $_POST["desc"];
|
||||||
$product->note = stripslashes($_POST["note"]);
|
$product->note = $_POST["note"];
|
||||||
$product->duration_value = $_POST["duration_value"];
|
$product->duration_value = $_POST["duration_value"];
|
||||||
$product->duration_unit = $_POST["duration_unit"];
|
$product->duration_unit = $_POST["duration_unit"];
|
||||||
$product->seuil_stock_alerte = $_POST["seuil_stock_alerte"];
|
$product->seuil_stock_alerte = $_POST["seuil_stock_alerte"];
|
||||||
@ -88,9 +88,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $value != $current_lang )
|
if ( $value != $current_lang ) $e_product = $product;
|
||||||
|
|
||||||
$e_product = $product;
|
|
||||||
|
|
||||||
$id = $product->create($user);
|
$id = $product->create($user);
|
||||||
|
|
||||||
@ -101,14 +99,11 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($id == -3)
|
$mesg='<div class="error">'.$product->error.'</div>';
|
||||||
{
|
|
||||||
$_error = 1;
|
|
||||||
$_GET["action"] = "create";
|
$_GET["action"] = "create";
|
||||||
$_GET["type"] = $_POST["type"];
|
$_GET["type"] = $_POST["type"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Action mise a jour d'un produit ou service
|
// Action mise a jour d'un produit ou service
|
||||||
if ($_POST["action"] == 'update' &&
|
if ($_POST["action"] == 'update' &&
|
||||||
@ -118,13 +113,13 @@ if ($_POST["action"] == 'update' &&
|
|||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($product->fetch($_POST["id"]))
|
if ($product->fetch($_POST["id"]))
|
||||||
{
|
{
|
||||||
$product->ref = stripslashes($_POST["ref"]);
|
$product->ref = $_POST["ref"];
|
||||||
$product->libelle = stripslashes($_POST["libelle"]);
|
$product->libelle = $_POST["libelle"];
|
||||||
if ( isset( $_POST["price"] ) )
|
if ( isset( $_POST["price"] ) )
|
||||||
$product->price = stripslashes($_POST["price"]);
|
$product->price = $_POST["price"];
|
||||||
$product->tva_tx = $_POST["tva_tx"];
|
$product->tva_tx = $_POST["tva_tx"];
|
||||||
$product->description = stripslashes($_POST["desc"]);
|
$product->description = $_POST["desc"];
|
||||||
$product->note = stripslashes($_POST["note"]);
|
$product->note = $_POST["note"];
|
||||||
$product->status = $_POST["statut"];
|
$product->status = $_POST["statut"];
|
||||||
$product->seuil_stock_alerte = $_POST["seuil_stock_alerte"];
|
$product->seuil_stock_alerte = $_POST["seuil_stock_alerte"];
|
||||||
$product->duration_value = $_POST["duration_value"];
|
$product->duration_value = $_POST["duration_value"];
|
||||||
@ -330,6 +325,9 @@ $html = new Form($db);
|
|||||||
if ($_GET["action"] == 'create' && $user->rights->produit->creer)
|
if ($_GET["action"] == 'create' && $user->rights->produit->creer)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
|
|
||||||
|
if ($mesg) print "$mesg\n";
|
||||||
|
|
||||||
if ($_error == 1)
|
if ($_error == 1)
|
||||||
{
|
{
|
||||||
$product = $e_product;
|
$product = $e_product;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,10 +18,9 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/product/pre.inc.php
|
\file htdocs/product/pre.inc.php
|
||||||
\ingroup product,service
|
\ingroup product,service
|
||||||
\brief Fichier gestionnaire du menu gauche des produits et services
|
\brief Fichier gestionnaire du menu gauche des produits et services
|
||||||
@ -103,10 +102,5 @@ function llxHeader($head = "", $urlp = "", $title="")
|
|||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste);
|
left_menu($menu->liste);
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,10 +18,9 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/product/stats/pre.inc.php
|
\file htdocs/product/stats/pre.inc.php
|
||||||
\ingroup product,service
|
\ingroup product,service
|
||||||
\brief Fichier gestionnaire du menu gauche des statistiques de produits et services
|
\brief Fichier gestionnaire du menu gauche des statistiques de produits et services
|
||||||
@ -96,11 +95,11 @@ function llxHeader($head = "", $urlp = "", $title="")
|
|||||||
$menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
|
$menu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
|
||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste);
|
if ($conf->categorie->enabled)
|
||||||
/*
|
{
|
||||||
*
|
$menu->add(DOL_URL_ROOT."/categories/", $langs->trans("Categories"));
|
||||||
*
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
left_menu($menu->liste);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user