Ajout filtre pour la liste des mouvements sur le numero de l'entrepot
This commit is contained in:
parent
ce407aa620
commit
c76648cc24
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-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-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
*
|
*
|
||||||
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/stock/mouvement.php
|
\file htdocs/product/stock/mouvement.php
|
||||||
\ingroup stock
|
\ingroup stock
|
||||||
\brief Page liste des mouvements de stocks
|
\brief Page liste des mouvements de stocks
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -52,13 +52,15 @@ $sql.= " m.value, ".$db->pdate("m.datem")." as datem";
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as s, ".MAIN_DB_PREFIX."stock_mouvement as m, ".MAIN_DB_PREFIX."product as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as s, ".MAIN_DB_PREFIX."stock_mouvement as m, ".MAIN_DB_PREFIX."product as p";
|
||||||
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||||
{
|
{
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cp.fk_categorie = c.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cp.fk_categorie = c.rowid";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE m.fk_product = p.rowid AND m.fk_entrepot = s.rowid";
|
$sql .= " WHERE m.fk_product = p.rowid AND m.fk_entrepot = s.rowid";
|
||||||
|
if ($_GET["id"])
|
||||||
|
$sql .= " AND s.rowid ='".$_GET["id"]."'";
|
||||||
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||||
{
|
{
|
||||||
$sql.= ' AND IFNULL(c.visible,1)=1';
|
$sql.= " AND IFNULL(c.visible,1)=1";
|
||||||
}
|
}
|
||||||
$sql .= " ORDER BY $sortfield $sortorder ";
|
$sql .= " ORDER BY $sortfield $sortorder ";
|
||||||
$sql .= $db->plimit($conf->liste_limit + 1 ,$offset);
|
$sql .= $db->plimit($conf->liste_limit + 1 ,$offset);
|
||||||
@ -66,31 +68,31 @@ $resql = $db->query($sql) ;
|
|||||||
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
|
{
|
||||||
|
$entrepot = new Entrepot($db);
|
||||||
|
$result = $entrepot->fetch($_GET["id"]);
|
||||||
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$entrepot = new Entrepot($db);
|
dolibarr_print_error($db);
|
||||||
$result = $entrepot->fetch($_GET["id"]);
|
|
||||||
if ($result < 0)
|
|
||||||
{
|
|
||||||
dolibarr_print_error($db);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$i = 0;
|
|
||||||
|
$i = 0;
|
||||||
$texte = $langs->trans("ListOfStockMovements");
|
|
||||||
llxHeader("","",$texte);
|
$texte = $langs->trans("ListOfStockMovements");
|
||||||
|
llxHeader("","",$texte);
|
||||||
|
|
||||||
/*
|
|
||||||
* Affichage onglets
|
/*
|
||||||
*/
|
* Affichage onglets
|
||||||
if ($_GET["id"])
|
*/
|
||||||
{
|
if ($_GET["id"])
|
||||||
|
{
|
||||||
$h = 0;
|
$h = 0;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche.php?id='.$entrepot->id;
|
$head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche.php?id='.$entrepot->id;
|
||||||
$head[$h][1] = $langs->trans("WarehouseCard");
|
$head[$h][1] = $langs->trans("WarehouseCard");
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user