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");
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("products");
|
||||
|
||||
$user->getrights('produit');
|
||||
|
||||
@ -81,7 +82,7 @@ if ($_POST["sendit"] && $conf->upload)
|
||||
|
||||
|
||||
|
||||
llxHeader();
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
|
||||
if ($product->id)
|
||||
|
||||
@ -314,8 +314,6 @@ if ($_POST["cancel"] == $langs->trans("Cancel"))
|
||||
}
|
||||
|
||||
|
||||
|
||||
llxHeader("","",$langs->trans("ProductServiceCard"));
|
||||
$html = new Form($db);
|
||||
|
||||
|
||||
@ -333,6 +331,8 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
|
||||
$product = $e_product;
|
||||
}
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="type" value="'.$_GET["type"].'">'."\n";
|
||||
@ -421,6 +421,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
|
||||
@ -135,8 +135,6 @@ if ($_POST["cancel"] == $langs->trans("Cancel"))
|
||||
}
|
||||
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
|
||||
/*
|
||||
* Fiche produit
|
||||
@ -148,6 +146,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
|
||||
@ -77,8 +77,6 @@ if ($_GET["action"] == 'delete' && $_GET["file"])
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct0"));
|
||||
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
@ -86,6 +84,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result)
|
||||
{
|
||||
|
||||
@ -88,12 +88,11 @@ if ($_POST["action"] == 'update_price' &&
|
||||
* Affiche historique prix
|
||||
*/
|
||||
|
||||
llxHeader("","",$langs->trans("Price"));
|
||||
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
$h=0;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("product");
|
||||
$langs->load("products");
|
||||
|
||||
|
||||
$mesg = '';
|
||||
@ -134,7 +134,7 @@ if ($cancel == $langs->trans("Cancel"))
|
||||
exit;
|
||||
}
|
||||
|
||||
llxHeader("","",$langs->trans("ProductServiceCard"));
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
$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");
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("products");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
@ -66,14 +67,14 @@ else
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
$langs->load("contracts");
|
||||
$langs->load("products");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
@ -65,14 +66,14 @@ else
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("products");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
@ -60,14 +61,14 @@ if ($user->societe_id > 0)
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
@ -50,8 +50,6 @@ else
|
||||
}
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("Statistics"));
|
||||
|
||||
$mesg = '';
|
||||
|
||||
|
||||
@ -63,6 +61,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result)
|
||||
{
|
||||
|
||||
@ -32,6 +32,8 @@ require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
|
||||
$langs->load("products");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
$page = $_GET["page"];
|
||||
@ -63,13 +65,14 @@ else
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ( $result > 0)
|
||||
{
|
||||
|
||||
@ -49,8 +49,6 @@ $types[0] = $langs->trans("Product");
|
||||
$types[1] = $langs->trans("Service");
|
||||
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct0"));
|
||||
|
||||
if ($_POST["action"] == "create_stock")
|
||||
{
|
||||
$product = new Product($db);
|
||||
@ -104,6 +102,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user