diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index e4a349382b0939935f9305e457d8a134ad9f4f87..369d226414a75945917fd8beb81106b67564192d 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -65,12 +65,15 @@ $invoicestatic=new Facture($db); $form = new Form($db); - if ($id > 0 || ! empty($ref)) { - $result = $object->fetch($id, $ref); + $result = $object->fetch($id, $ref); + + $helpurl=''; + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; - llxHeader("","",$langs->trans("CardProduct".$object->type)); + llxHeader("", $langs->trans("CardProduct".$object->type), $help_url); /* * En mode visu diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 19c7837b954e3ee383ea66319e508a874a4f4322..a65adb1c4b35d594023c1b8f242897d0deab4fe3 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -133,6 +133,10 @@ else if($action==='save_composed_product') * View */ +$helpurl=''; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + $product_fourn = new ProductFournisseur($db); $productstatic = new Product($db); $form = new Form($db); @@ -176,7 +180,7 @@ if ($action == 'search') //print $sql; -llxHeader("","",$langs->trans("CardProduct".$object->type)); +llxHeader("", $langs->trans("CardProduct".$object->type), $helpurl); $head=product_prepare_head($object); $titre=$langs->trans("CardProduct".$object->type); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 97925bff99cad341f468eee5b9d73ea638d9951f..259ffae5913b8b5154bc6b50697772ba76cc284b 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -166,7 +166,11 @@ if ($action=='filemerge') $form = new Form($db); -llxHeader("","",$langs->trans("CardProduct".$object->type)); +$helpurl=''; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + +llxHeader("", $langs->trans("CardProduct".$object->type), $help_url); if ($object->id) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index c51bf7fae0105c40e3906177d53ff16ca49cbafd..3eb08370aba82fcf610077dddc30944d48bc8b61 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -274,13 +274,17 @@ if (empty($reshook)) * view */ +$helpurl=''; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + $form = new Form($db); if ($id > 0 || $ref) { if ($action <> 're-edit') { - llxHeader("","",$langs->trans("CardProduct".$object->type)); + llxHeader("", $langs->trans("CardProduct".$object->type), $helpurl); } if ($result) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 47a4add24471292bb02ca167ff442fa84030966d..a0306af338eb5d2aaef85154de20bbfacab5c3cf 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -49,6 +49,7 @@ $product_static = new Product($db); */ $transAreaType = $langs->trans("ProductsAndServicesArea"); + $helpurl=''; if (! isset($_GET["type"])) { @@ -66,7 +67,7 @@ if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enable $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; } -llxHeader("",$langs->trans("ProductsAndServices"),$helpurl); +llxHeader("", $langs->trans("ProductsAndServices"), $helpurl); $linkback=""; print load_fiche_titre($transAreaType,$linkback,'title_products.png'); diff --git a/htdocs/product/info.php b/htdocs/product/info.php index 51510b518a6d63f51ee464c592560f8f6455c2f9..71f1908e434cf381b6da2f032d89f40ec2bee57f 100644 --- a/htdocs/product/info.php +++ b/htdocs/product/info.php @@ -56,13 +56,15 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e * View */ -$form=new Form($b); - -$title=$langs->trans("Product"); $helpurl=''; if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; -llxHeader('',$title,$help_url); + +$title=$langs->trans("Product"); + +$form=new Form($b); + +llxHeader('', $title, $help_url); if ($id > 0 || $ref) { diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index ee04299cd4c48cc3c9e9e95bd416d970fe05e799..52ed6c9c9695e9aad0a659a26575962f7704356e 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -61,23 +61,19 @@ $helpurl=''; if ($type == '0') { $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; - //$title=$langs->trans("StatisticsOfProducts"); - $title=$langs->trans("Statistics"); } else if ($type == '1') { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; - //$title=$langs->trans("StatisticsOfServices"); - $title=$langs->trans("Statistics"); } else { $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; - //$title=$langs->trans("StatisticsOfProductsOrServices"); - $title=$langs->trans("Statistics"); } +$title=$langs->trans("Statistics"); -llxHeader('','',$helpurl); + +llxHeader('', $title, $helpurl); print load_fiche_titre($title, $mesg,'title_products.png'); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 694297b5b2fbf0b687f41ec19477013613689ee7..c645d76062ef634e0f5af2a965aca23191e49026 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -618,7 +618,12 @@ if (! empty($id) || ! empty($ref)) // fetch updated prices $object->fetch($id, $ref); } -llxHeader("", "", $langs->trans("CardProduct" . $object->type)); + +$helpurl=''; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + +llxHeader("", $langs->trans("CardProduct" . $object->type), $hepl_url); $head = product_prepare_head($object); $titre = $langs->trans("CardProduct" . $object->type); diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 56dcc876d3e3cb75de154fae3b601a6985bcdf4f..e2a648872693d489eccffa498af9efc0d84b2cf0 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -101,10 +101,13 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global // None + /* * View */ +$helpurl='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; + $form=new Form($db); $htmlother=new FormOther($db); @@ -184,9 +187,6 @@ if ($resql) exit; } - $helpurl=''; - $helpurl='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; - if (isset($type)) { if ($type==1) { $texte = $langs->trans("Services"); } @@ -197,7 +197,7 @@ if ($resql) $texte.=' ('.$langs->trans("Stocks").')'; - llxHeader("",$texte,$helpurl); + llxHeader("", $texte, $helpurl); if ($sref || $snom || $sall || GETPOST('search')) { diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index f7d5e60ca72bbda565102a97be909badc3a4d241..81a7e7b800d27afecc3e113be8ffd3e06d8b8c02 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -100,6 +100,8 @@ if (! empty($_POST["button_removefilter_x"])) * View */ +$helpurl='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; + $form=new Form($db); $htmlother=new FormOther($db); @@ -192,9 +194,6 @@ if ($resql) exit; } - $helpurl=''; - $helpurl='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; - if (isset($type)) { if ($type==1) { $texte = $langs->trans("Services"); } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index d83dfd238c73ff2dcddf20f214f7b784495a6423..0460eca7c4c5fc63bd76b18ff4940d3a6bbb51c6 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -163,7 +163,11 @@ $result = $object->fetch($id,$ref); * View */ -llxHeader("","",$langs->trans("Translation")); +$helpurl=''; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + +llxHeader("", $langs->trans("Translation"), $help_url); $form = new Form($db); $formadmin=new FormAdmin($db);