Fix: affichage du header en fonction du produit/service
This commit is contained in:
parent
4a02dce0cf
commit
4c7024033c
@ -34,6 +34,7 @@ require('./pre.inc.php');
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
$langs->load("products");
|
||||||
|
|
||||||
$user->getrights('produit');
|
$user->getrights('produit');
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ if ($_POST["sendit"] && $conf->upload)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
|
|
||||||
if ($product->id)
|
if ($product->id)
|
||||||
|
|||||||
@ -314,8 +314,6 @@ if ($_POST["cancel"] == $langs->trans("Cancel"))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("ProductServiceCard"));
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
@ -333,6 +331,8 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
|
|||||||
$product = $e_product;
|
$product = $e_product;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
print '<form action="fiche.php" method="post">';
|
print '<form action="fiche.php" method="post">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n";
|
print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n";
|
||||||
@ -421,6 +421,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $result )
|
if ( $result )
|
||||||
|
|||||||
@ -135,8 +135,6 @@ if ($_POST["cancel"] == $langs->trans("Cancel"))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fiche produit
|
* Fiche produit
|
||||||
@ -148,6 +146,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $result )
|
if ( $result )
|
||||||
|
|||||||
@ -77,8 +77,6 @@ if ($_GET["action"] == 'delete' && $_GET["file"])
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct0"));
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($_GET["id"] || $_GET["ref"])
|
||||||
{
|
{
|
||||||
@ -87,6 +85,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -88,12 +88,11 @@ if ($_POST["action"] == 'update_price' &&
|
|||||||
* Affiche historique prix
|
* Affiche historique prix
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("Price"));
|
|
||||||
|
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
|||||||
|
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("product");
|
$langs->load("products");
|
||||||
|
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
@ -134,7 +134,7 @@ if ($cancel == $langs->trans("Cancel"))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("ProductServiceCard"));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
$langs->load("products");
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
@ -66,8 +67,6 @@ else
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($_GET["id"] || $_GET["ref"])
|
||||||
{
|
{
|
||||||
@ -75,6 +74,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
$langs->load("products");
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
@ -65,8 +66,6 @@ else
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($_GET["id"] || $_GET["ref"])
|
||||||
{
|
{
|
||||||
@ -74,6 +73,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
$langs->load("products");
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
@ -60,8 +61,6 @@ if ($user->societe_id > 0)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($_GET["id"] || $_GET["ref"])
|
||||||
{
|
{
|
||||||
@ -69,6 +68,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -50,8 +50,6 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Statistics"));
|
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
|
|
||||||
@ -64,6 +62,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
// Efface rep obsolete
|
// Efface rep obsolete
|
||||||
|
|||||||
@ -32,6 +32,8 @@ require("./pre.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
|
$langs->load("products");
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
@ -63,7 +65,6 @@ else
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($_GET["id"] || $_GET["ref"])
|
||||||
{
|
{
|
||||||
@ -71,6 +72,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ( $result > 0)
|
if ( $result > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -49,8 +49,6 @@ $types[0] = $langs->trans("Product");
|
|||||||
$types[1] = $langs->trans("Service");
|
$types[1] = $langs->trans("Service");
|
||||||
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct0"));
|
|
||||||
|
|
||||||
if ($_POST["action"] == "create_stock")
|
if ($_POST["action"] == "create_stock")
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
@ -105,6 +103,8 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||||
|
|
||||||
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user