Modif fournies pas Simon

This commit is contained in:
Rodolphe Quiedeville 2005-07-06 16:10:07 +00:00
parent 37906e9649
commit f4fe9ad2cd

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
* *
* 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
@ -167,9 +168,7 @@ else
if ($_GET["id"]) if ($_GET["id"])
{ {
if ($mesg) { if ($mesg) print $mesg;
print $mesg;
}
$entrepot = new Entrepot($db); $entrepot = new Entrepot($db);
$result = $entrepot->fetch($_GET["id"]); $result = $entrepot->fetch($_GET["id"]);
@ -224,6 +223,45 @@ else
print "</td></tr>"; print "</td></tr>";
print "</table>"; print "</table>";
//affichage de la liste des produits de l\'entrepot
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Product"),"", "p.ref","","","",$sortfield);
print "<td align=\"center\">".$langs->trans("Units")."</td>";
print "</tr>\n";
$sql = "SELECT p.rowid as rowid, p.label as produit, ps.reel as value ";
$sql .= " FROM ".MAIN_DB_PREFIX."product_stock ps, ".MAIN_DB_PREFIX."product p ";
$sql .= " WHERE ps.fk_product = p.rowid ";
$sql .= " AND ps.reel >0 AND ps.fk_entrepot = $id";
//$sql .= $db->plimit($limit + 1 ,$offset);
$resql = $db->query($sql) ;
if ($resql)
{$num = $db->num_rows($resql);
$i = 0;
$var=True;
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]>";
//print '<td>'.dolibarr_print_date($objp->datem).'</td>';
print "<td><a href=\"../fiche.php?id=$objp->rowid\">";
print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit;
print "</a></td>\n";
print '<td align="center">'.$objp->value.'</td>';
//print "<td><a href=\"fiche.php?id=$objp->entrepot_id\">";
//print img_object($langs->trans("ShowWarehous"),"stock").' '.$objp->stock;
//print "</a></td>\n";
print "</tr>\n";
$i++;
}
$db->free($resql);
}
print "</table>\n";
print "<br></div>\n"; print "<br></div>\n";
} }
@ -293,7 +331,6 @@ if ($_GET["action"] == '')
print "</div>"; print "</div>";
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");