diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index afaf4c8e796..33e1ea46dd9 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -125,7 +125,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); } -$sql .= " ORDER BY ".$sortfield." ".$sortorder; +$sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($limit + 1, $offset); dol_syslog("fourn/product/list.php:", LOG_DEBUG); @@ -225,11 +225,11 @@ if ($resql) if ($companystatic->id > 0) print $companystatic->getNomUrl(1,'supplier'); print ''; - print ''.price($objp->price).''; + print ''.(isset($objp->price) ? price($objp->price) : '').''; print ''.$objp->qty.''; - print ''.price($objp->unitprice).''; + print ''.(isset($objp->unitprice) ? price($objp->unitprice) : '').''; print "\n"; $i++;