From 23b7b4cb9fe70bb05822732adc5516d326f3bec8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Aug 2011 00:36:29 +0000 Subject: [PATCH] New: task #11243: Add best supplier price --- htdocs/product/liste.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index dfc92882596..c2abfb26b69 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -21,7 +21,7 @@ * \file htdocs/product/liste.php * \ingroup produit * \brief Page to list products and services - * \version $Id: liste.php,v 1.154 2011/08/21 00:26:31 eldy Exp $ + * \version $Id: liste.php,v 1.155 2011/08/21 00:36:29 eldy Exp $ */ require("../main.inc.php"); @@ -435,20 +435,15 @@ if ($resql) // MinimumPrice print ''; - if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire && $type != 1) + // TODO Find min price with a min on unitprice into select request instead of subrequests + if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0) { - if ($objp->fk_product_type != 1) - { - if ($product_fourn->find_min_price_product_fournisseur($objp->rowid)) - { - if ($product_fourn->product_fourn_price_id > 0) - { - $htmltext=$product_fourn->display_price_product_fournisseur(); - if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire) print $html->textwithpicto(price($product_fourn->fourn_unitprice),$htmltext); - else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"); - } - } - } + if ($product_fourn->product_fourn_price_id > 0) + { + $htmltext=$product_fourn->display_price_product_fournisseur(); + if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire) print $html->textwithpicto(price($product_fourn->fourn_unitprice),$htmltext); + else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"); + } } print ''; @@ -506,5 +501,5 @@ else $db->close(); -llxFooter('$Date: 2011/08/21 00:26:31 $ - $Revision: 1.154 $'); +llxFooter('$Date: 2011/08/21 00:36:29 $ - $Revision: 1.155 $'); ?>