Update list.php

This commit is contained in:
Anthony Berton 2020-05-14 11:37:26 +02:00
parent 52b47fd598
commit 36b63ed921

View File

@ -1251,27 +1251,27 @@ if ($resql)
foreach ($arraypricelevel as $key => $value) foreach ($arraypricelevel as $key => $value)
{ {
if (!empty($arrayfields['p.sellprice'.$key]['checked'])) if (!empty($arrayfields['p.sellprice'.$key]['checked']))
{
print '<td class="right nowraponall">';
if ($obj->tosell)
{ {
$resultp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price"; $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 .= " FROM ".MAIN_DB_PREFIX."product_price as p";
$resultp .= " WHERE fk_product = ".$obj->rowid; $resultp .= " WHERE fk_product = ".$obj->rowid;
if (!empty($conf->global->PRODUIT_MULTIPRICES)) $resultp .= " AND p.price_level = ".$key; $resultp .= " AND p.price_level = ".$key;
$resultp .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC"; $resultp .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC";
$resultp = $db->query($resultp); $resultp = $db->query($resultp);
if ($resultp) if ($resultp)
{ {
$objp = $db->fetch_object($resultp); $objp = $db->fetch_object($resultp);
print '<td class="right nowraponall">';
if ($obj->tosell)
{
if ($obj->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); if ($obj->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
else print price($objp->price).' '.$langs->trans("HT"); else print price($objp->price).' '.$langs->trans("HT");
}
print '</td>';
$db->free($resultp); $db->free($resultp);
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
}
print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
} }