Fix: on n'affiche pas les produits personnalisés

This commit is contained in:
Regis Houssin 2007-12-17 12:14:50 +00:00
parent 8c42118095
commit 46b4c7ff57

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -232,6 +233,7 @@ if ($id > 0)
print '<td align="right">'.$langs->trans("QtyDelivered").'</td>'; print '<td align="right">'.$langs->trans("QtyDelivered").'</td>';
print "</tr>\n"; print "</tr>\n";
} }
$var=false; $var=false;
$entrepot = new Entrepot($db); $entrepot = new Entrepot($db);
@ -239,6 +241,10 @@ if ($id > 0)
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
// On n'affiche pas les produits personnalisés
if ($objp->fk_product)
{
$var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'; print '<td>';
print '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.'</a>'; print '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),'product').' '.$objp->ref.'</a>';
@ -266,9 +272,8 @@ if ($id > 0)
print "</td>\n"; print "</td>\n";
print '<td align="right"><input name="qty_'.$i.'" type="text" size="8" value="'.($objp->qty-$products_dispatched[$objp->fk_product]).'"></td>'; print '<td align="right"><input name="qty_'.$i.'" type="text" size="8" value="'.($objp->qty-$products_dispatched[$objp->fk_product]).'"></td>';
print "</tr>\n"; print "</tr>\n";
}
$i++; $i++;
$var=!$var;
} }
$db->free($resql); $db->free($resql);
} }