From 36b63ed921b555b297da38c2467b1e32037c9c1f Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Thu, 14 May 2020 11:37:26 +0200 Subject: [PATCH] Update list.php --- htdocs/product/list.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index f818d2f475a..d6b3def0967 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1252,26 +1252,26 @@ if ($resql) { if (!empty($arrayfields['p.sellprice'.$key]['checked'])) { - $resultp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price"; - $resultp .= " FROM ".MAIN_DB_PREFIX."product_price as p"; - $resultp .= " WHERE fk_product = ".$obj->rowid; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) $resultp .= " AND p.price_level = ".$key; - $resultp .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC"; - $resultp = $db->query($resultp); - if ($resultp) + print ''; + if ($obj->tosell) { - $objp = $db->fetch_object($resultp); - print ''; - if ($obj->tosell) - { - if ($obj->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); - else print price($objp->price).' '.$langs->trans("HT"); + $resultp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price"; + $resultp .= " FROM ".MAIN_DB_PREFIX."product_price as p"; + $resultp .= " WHERE fk_product = ".$obj->rowid; + $resultp .= " AND p.price_level = ".$key; + $resultp .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC"; + $resultp = $db->query($resultp); + if ($resultp) + { + $objp = $db->fetch_object($resultp); + if ($obj->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); + else print price($objp->price).' '.$langs->trans("HT"); + $db->free($resultp); + } else { + dol_print_error($db); } - print ''; - $db->free($resultp); - } else { - dol_print_error($db); } + print ''; if (!$i) $totalarray['nbfield']++; } }