diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index cbe400c10f0..5c4b2038d95 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -361,8 +361,8 @@ if ($_GET["id"] > 0)
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l ";
$sql .= " WHERE l.fk_commande = $commande->id ORDER BY l.rowid";
- $result = $db->query($sql);
- if ($result)
+ $resql = $db->query($sql);
+ if ($resql)
{
$num_lignes = $db->num_rows();
$i = 0; $total = 0;
@@ -388,7 +388,7 @@ if ($_GET["id"] > 0)
if ($objp->fk_product > 0)
{
print '
';
- print ''.stripslashes(nl2br($objp->description)).' | ';
+ print ''.stripslashes(nl2br($objp->description)).'';
}
else
{
@@ -454,20 +454,22 @@ if ($_GET["id"] > 0)
$sql .= " WHERE p.rowid = pf.fk_product AND pf.fk_soc = ".$commande->fourn_id;
$sql .= " AND quantity = 1";
$sql .= " ORDER BY p.ref ";
- if ( $db->query($sql) )
+ $resql = $db->query($sql);
+ if ($resql)
{
$opt = "";
- if ($result)
+ if ($resql)
{
- $num = $db->num_rows(); $i = 0;
+ $num = $db->num_rows($resql);
+ $i = 0;
while ($i < $num)
{
- $objp = $db->fetch_object();
+ $objp = $db->fetch_object($resql);
$opt .= "\n";
$i++;
}
}
- $db->free();
+ $db->free($resql);
}
else
{