New: task #11243: Add best supplier price

This commit is contained in:
Laurent Destailleur 2011-08-21 00:36:29 +00:00
parent 84f7eb9da6
commit 23b7b4cb9f

View File

@ -21,7 +21,7 @@
* \file htdocs/product/liste.php * \file htdocs/product/liste.php
* \ingroup produit * \ingroup produit
* \brief Page to list products and services * \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"); require("../main.inc.php");
@ -435,11 +435,8 @@ if ($resql)
// MinimumPrice // MinimumPrice
print '<td align="right">'; print '<td align="right">';
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) if ($product_fourn->product_fourn_price_id > 0)
{ {
@ -448,8 +445,6 @@ if ($resql)
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"); else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
} }
} }
}
}
print '</td>'; print '</td>';
// Show stock // Show stock
@ -506,5 +501,5 @@ else
$db->close(); $db->close();
llxFooter('$Date: 2011/08/21 00:26:31 $ - $Revision: 1.154 $'); llxFooter('$Date: 2011/08/21 00:36:29 $ - $Revision: 1.155 $');
?> ?>