From 0a5c3e1fa81b6d1d2b1d35e258b7933bd414b9f6 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 23 Feb 2015 23:15:41 +0100
Subject: [PATCH] Fix price must be hidden if context is not on sell

---
 htdocs/product/list.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index a5cc97defa7..c060ef424e6 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -456,8 +456,11 @@ else
     			if (empty($conf->global->PRODUIT_MULTIPRICES))
     			{
     			    print '<td align="right">';
-        			if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
-        			else print price($objp->price).' '.$langs->trans("HT");
+    			    if ($objp->tosell)
+    			    {
+        				if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
+        				else print price($objp->price).' '.$langs->trans("HT");
+    			    }
         			print '</td>';
     			}
 
@@ -465,7 +468,7 @@ else
     			if ($user->rights->fournisseur->lire)
     			{
         			print  '<td align="right">';
-        			if ($objp->minsellprice != '')
+    			    if ($objp->tobuy && $objp->minsellprice != '')
         			{
     					//print price($objp->minsellprice).' '.$langs->trans("HT");
     					if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0)
-- 
GitLab