[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: mouvement.php,v 1.11 2005/09/21 23:43:08 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/product/stock/mouvement.php,v $ 21 */ 22 23 /** 24 \file htdocs/product/stock/mouvement.php 25 \ingroup stock 26 \brief Page liste des mouvements de stocks 27 \version $Revision: 1.11 $ 28 */ 29 30 require ("./pre.inc.php"); 31 $user->getrights('produit'); 32 33 $langs->load("products"); 34 35 if (!$user->rights->produit->lire) accessforbidden(); 36 37 38 $page = $_GET["page"]; 39 $sortfield = $_GET["sortfield"]; 40 $sortorder = $_GET["sortorder"]; 41 42 if ($page < 0) $page = 0; 43 $limit = $conf->liste_limit; 44 $offset = $limit * $page; 45 46 if (! $sortfield) $sortfield="m.datem"; 47 if (! $sortorder) $sortorder="DESC"; 48 49 $sql = "SELECT p.rowid, p.label as produit, s.label as stock, m.value, ".$db->pdate("m.datem")." as datem, s.rowid as entrepot_id"; 50 $sql .= " FROM llx_product as p, llx_entrepot as s, llx_stock_mouvement as m"; 51 $sql .= " WHERE m.fk_product = p.rowid AND m.fk_entrepot = s.rowid"; 52 53 $sql .= " ORDER BY $sortfield $sortorder "; 54 $sql .= $db->plimit($limit + 1 ,$offset); 55 $result = $db->query($sql) ; 56 57 if ($result) 58 { 59 $num = $db->num_rows($result); 60 61 $i = 0; 62 63 $texte = $langs->trans("ListOfStockMovements"); 64 llxHeader("","",$texte); 65 66 print_barre_liste($texte, $page, "mouvement.php", "&sref=$sref&snom=$snom", $sortfield, $sortorder,'',$num); 67 68 print '<table class="noborder" width="100%">'; 69 print "<tr class=\"liste_titre\">"; 70 print_liste_field_titre($langs->trans("Date"),"mouvement.php", "m.datem","","","",$sortfield); 71 print_liste_field_titre($langs->trans("Product"),"mouvement.php", "p.ref","","","",$sortfield); 72 print "<td align=\"center\">".$langs->trans("Units")."</td>"; 73 print_liste_field_titre($langs->trans("Warehouse"),"mouvement.php", "s.label","","","",$sortfield); 74 print "</tr>\n"; 75 76 $var=True; 77 while ($i < min($num,$limit)) 78 { 79 $objp = $db->fetch_object($result); 80 $var=!$var; 81 print "<tr $bc[$var]>"; 82 print '<td>'.dolibarr_print_date($objp->datem).'</td>'; 83 print "<td><a href=\"../fiche.php?id=$objp->rowid\">"; 84 print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit; 85 print "</a></td>\n"; 86 print '<td align="center">'.$objp->value.'</td>'; 87 print "<td><a href=\"fiche.php?id=$objp->entrepot_id\">"; 88 print img_object($langs->trans("ShowWarehous"),"stock").' '.$objp->stock; 89 print "</a></td>\n"; 90 print "</tr>\n"; 91 $i++; 92 } 93 $db->free($result); 94 95 print "</table>"; 96 97 } 98 else 99 { 100 dolibarr_print_error($db); 101 } 102 103 104 $db->close(); 105 106 llxFooter('$Date: 2005/09/21 23:43:08 $ - $Revision: 1.11 $'); 107 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |