diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index f4875320235..6b22516bab9 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -154,4 +154,6 @@ ConfirmCloneProduct=Are you sure you want to clone product or service %s CloneContentProduct=Clone all main informations of product/service ClonePricesProduct=Clone main informations and prices ProductIsUsed=This product is used -NewRefForClone=Ref. of new product/service \ No newline at end of file +NewRefForClone=Ref. of new product/service +CustomerPrices=Customers prices +SuppliersPrices=Suppliers prices \ No newline at end of file diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 3700e98f3b4..78b748a3e2d 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -154,4 +154,6 @@ ConfirmCloneProduct=Etes-vous sur de vouloir cloner le produit ou service %s< CloneContentProduct=Cloner les informations générales du produit/service uniquement ClonePricesProduct=Cloner les informations générales et les prix ProductIsUsed=Ce produit est utilisé -NewRefForClone=Réf. du nouveau produit/service \ No newline at end of file +NewRefForClone=Réf. du nouveau produit/service +CustomerPrices=Prix clients +SuppliersPrices=Prix fournisseurs \ No newline at end of file diff --git a/htdocs/lib/product.lib.php b/htdocs/lib/product.lib.php index 54e274c3852..1773719a215 100644 --- a/htdocs/lib/product.lib.php +++ b/htdocs/lib/product.lib.php @@ -31,6 +31,8 @@ function product_prepare_head($product, $user) { global $langs, $conf; + $langs->load("products"); + $h = 0; $head = array(); @@ -40,10 +42,18 @@ function product_prepare_head($product, $user) $h++; $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; - $head[$h][1] = $langs->trans("Price"); + $head[$h][1] = $langs->trans("CustomerPrices"); $head[$h][2] = 'price'; $h++; + if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire) + { + $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; + $head[$h][1] = $langs->trans("SuppliersPrices"); + $head[$h][2] = 'suppliers'; + $h++; + } + $head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id; $head[$h][1] = $langs->trans("Photos"); $head[$h][2] = 'photos'; @@ -85,14 +95,6 @@ function product_prepare_head($product, $user) $h++; } - if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire) - { - $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id; - $head[$h][1] = $langs->trans("Suppliers"); - $head[$h][2] = 'suppliers'; - $h++; - } - $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][1] = $langs->trans('Statistics'); $head[$h][2] = 'stats'; diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php index e595cf0c4b7..0b8337b9a43 100644 --- a/htdocs/product/barcode.php +++ b/htdocs/product/barcode.php @@ -110,18 +110,6 @@ print ''; print ''."\n"; -// Prix -print ''.$langs->trans("SellingPrice").''; -if ($product->price_base_type == 'TTC') -{ - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); -} -else -{ - print price($product->price).' '.$langs->trans($product->price_base_type); -} -print ''."\n"; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index fe98fdb883c..f61b17b69ba 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER @@ -107,7 +107,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) /* - * + * View */ $html = new Form($db); @@ -156,18 +156,6 @@ if ($product->id) // Libelle print ''.$langs->trans("Label").''.$product->libelle.''; - // Prix - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 87510889cf9..b5b4d0f3a29 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2009 Regis Houssin * @@ -177,8 +177,9 @@ if ($_POST["cancel"] == $langs->trans("Cancel")) /* - * Affichage fiche + * view */ + $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) @@ -219,18 +220,6 @@ if ($_GET["id"] || $_GET["ref"]) // Libelle print ''.$langs->trans("Label").''.$product->libelle.''; - // Prix - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 792762c5393..75d040df757 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -123,18 +123,6 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - // Prix - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 951c6824324..afb4943938f 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -100,18 +100,6 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - // Price - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index e3da40bf327..d150b12fd49 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -1,6 +1,6 @@ - * Copyright (c) 2004-2009 Laurent Destailleur + * Copyright (c) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Eric Seigne * @@ -83,17 +83,6 @@ if ($_GET["id"] || $_GET["ref"]) // Libelle print ''.$langs->trans("Label").''.$product->libelle.''; - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f679342739d..21917537475 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2005-2009 Regis Houssin @@ -47,6 +47,7 @@ $result=restrictedArea($user,'produit&stock',$id,'product','','',$fieldid); $mesg = ''; + /* * Actions */ @@ -151,18 +152,6 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - // Price - print ''.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print ''; - // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2);