diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 86126323522..43a36a1f53e 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -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) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index b1dec1ba74d..223250d93b1 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -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 '
'; print ''; print ''."\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 ) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index c5eae6a71b3..c849a0e57ff 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -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 ) diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 9693417cd9c..82bc1e904e6 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -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) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index f174be8d4e6..30f49f99746 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -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; diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 0571bc90439..ea24f8168aa 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -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); diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index ff29ec1a37e..2ab901df1d0 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -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) { diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index e6788a41513..03c27f5610a 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -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) { diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index c2c01def37c..a3c85eee6dd 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -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) { diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 19723c182e8..de794607fae 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -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) { diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 019f193a67b..c2f8605b95d 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -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) { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7abaebf765f..689a6059649 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -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) {