From d008c8a3c3b287028fdeaea5bd59e8f683bbe00a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 May 2011 21:11:21 +0000 Subject: [PATCH] Qual: Removed useless file --- htdocs/product/stats/index.php | 186 --------------------------------- 1 file changed, 186 deletions(-) diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php index 31cb4715b50..e69de29bb2d 100644 --- a/htdocs/product/stats/index.php +++ b/htdocs/product/stats/index.php @@ -1,186 +0,0 @@ - - * Copyright (C) 2004 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \file htdocs/product/stats/index.php - * \brief Page accueil statistiques produits - * \version $Id$ - s*/ - -require("../../main.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); - -// Security check -if ($user->societe_id) $socid=$user->societe_id; -$result=restrictedArea($user,'produit|service'); - -llxHeader(); - -$mesg = ''; - -/* - * - * - */ -$sql = "SELECT count(*)"; -$sql.= " FROM ".MAIN_DB_PREFIX."product as p"; -$sql.= " WHERE p.fk_product_type <> 1"; -if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; -if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; -$sql.= " AND p.entity = ".$conf->entity; - -if ($db->query($sql)) -{ - $row = $db->fetch_row(0); - $nbproduct = $row[0]; -} -$db->free(); - - -$sql = "SELECT count(*)"; -$sql.= " FROM ".MAIN_DB_PREFIX."product as p"; -$sql.= " WHERE p.tosell = 0"; -if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; -if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; -$sql.= " AND p.fk_product_type <> '1'"; -$sql.= " AND p.entity = ".$conf->entity; - -if ($db->query($sql)) -{ - $row = $db->fetch_row(0); - $nbhv = $row[0]; -} -$db->free(); - -if ($conf->product->enabled && $conf->service->enabled) -{ - print_fiche_titre($langs->trans("ProductsAndServicesStatistics"), $mesg); -} -elseif ($conf->product->enabled) -{ - print_fiche_titre($langs->trans("ProductsStatistics"), $mesg); -} -elseif ($conf->service->enabled) -{ - print_fiche_titre($langs->trans("ServicesStatistics"), $mesg); -} - -print '
'; -print ''; - -print ''; -print ''; -print "\n"; - -$var=True; -print ""; -print ''; -print ''; -$var=!$var; -print ""; -print ''; -print ''; - -if ($conf->service->enabled) -{ - $sql = "SELECT count(*)"; - $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; - $sql.= " WHERE p.fk_product_type = '1'"; - if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; - if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; - $sql.= " AND p.entity = ".$conf->entity; - - if ($db->query($sql)) - { - $row = $db->fetch_row(0); - $nbproduct = $row[0]; - } - $db->free(); - - $sql = "SELECT count(*)"; - $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; - $sql.= " WHERE p.tosell = 0"; - if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; - if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; - $sql.= " AND p.fk_product_type = '1'"; - $sql.= " AND p.entity = ".$conf->entity; - - if ($db->query($sql)) - { - $row = $db->fetch_row(0); - $nbhv = $row[0]; - } - $db->free(); - - $var=!$var; - print ""; - print ''; - print ''; - - $var=!$var; - print ""; - print ''; - print ''; - - print '
'.$langs->trans("Summary").''.$langs->trans("Value").'
Nb de produit dans le catalogue'.$nbproduct.'
Nb de produit dans le catalogue qui ne sont pas en vente'.$nbhv.'
Nb de service dans le catalogue'.$nbproduct.'
Nb de service dans le catalogue qui ne sont pas en vente'.$nbhv.'
'; -} - - -// Stats des produits en factures, propale, ... -/* -print '
'; -print ''; -print ""; -print ""; -print ""; -print ""; -print "\n"; -$sql = "SELECT p.label, sum(f.qty) as sumf, sum(pr.qty) as sumpr FROM ".MAIN_DB_PREFIX."product as p"; -$sql.=" left join ".MAIN_DB_PREFIX."facturedet as f on p.rowid = f.fk_product"; -$sql.=" left join ".MAIN_DB_PREFIX."propaldet as pr on p.rowid = pr.fk_product"; -$sql.=" group by p.label"; -$resql=$db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print ""; - print ""; - print ""; - print ""; - print ''; - $i++; - } -} -else { - dol_print_error($db); -} -print "
Produit/ServiceQt� en factureQt� en propale
".$obj->label."".$obj->sumf."".$obj->sumpr."
\n"; -$db->free($resql); -*/ - - -$db->close(); - -llxFooter('$Date$ - $Revision$'); -?>