Fix: Minor fixes

Qual: Remove deprecated file
This commit is contained in:
Laurent Destailleur 2008-03-05 18:33:31 +00:00
parent 0cad028fb8
commit 579c94d335
10 changed files with 47 additions and 57 deletions

View File

@ -23,6 +23,7 @@ BoxTitleLastRssInfos=Last %s news from %s
BoxTitleLastProducts=Last %s modified products/services BoxTitleLastProducts=Last %s modified products/services
BoxTitleLastCustomerOrders=Last %s modified customer orders BoxTitleLastCustomerOrders=Last %s modified customer orders
BoxTitleLastSuppliers=Last %s recorded suppliers BoxTitleLastSuppliers=Last %s recorded suppliers
BoxTitleLastCustomers=Last %s recorded customers
BoxTitleLastCustomersOrProspects=Last %s recorded customers or prospects BoxTitleLastCustomersOrProspects=Last %s recorded customers or prospects
BoxTitleLastPropals=Last %s recorded proposals BoxTitleLastPropals=Last %s recorded proposals
BoxTitleLastCustomerBills=Last %s customer's invoices BoxTitleLastCustomerBills=Last %s customer's invoices

View File

@ -23,6 +23,7 @@ BoxTitleLastRssInfos=Les %s derni
BoxTitleLastProducts=Les %s derniers produits/services enregistrés BoxTitleLastProducts=Les %s derniers produits/services enregistrés
BoxTitleLastCustomerOrders=Les %s dernières commandes clients modifiées BoxTitleLastCustomerOrders=Les %s dernières commandes clients modifiées
BoxTitleLastSuppliers=Les %s derniers fournisseurs enregistrés BoxTitleLastSuppliers=Les %s derniers fournisseurs enregistrés
BoxTitleLastCustomers=Les %s derniers clients enregistrés
BoxTitleLastCustomersOrProspects=Les %s derniers clients ou prospects enregistrés BoxTitleLastCustomersOrProspects=Les %s derniers clients ou prospects enregistrés
BoxTitleLastPropals=Les %s dernières propositions enregistrés BoxTitleLastPropals=Les %s dernières propositions enregistrés
BoxTitleLastCustomerBills=Les %s dernières factures clients enregistrées BoxTitleLastCustomerBills=Les %s dernières factures clients enregistrées

View File

@ -25,11 +25,8 @@
\version $Id$ \version $Id$
*/ */
// Pour compatibilité lors de l'upgrade // Pour compatibilité lors de l'upgrade
if (! defined('DOL_DOCUMENT_ROOT')) if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
{ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
define('DOL_DOCUMENT_ROOT', '../..');
}
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
/** /**

View File

@ -26,11 +26,8 @@
\version $Id$ \version $Id$
*/ */
// Pour compatibilité lors de l'upgrade // Pour compatibilité lors de l'upgrade
if (! defined('DOL_DOCUMENT_ROOT')) if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
{ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
define('DOL_DOCUMENT_ROOT', '../..');
}
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
/** /**

View File

@ -26,11 +26,8 @@
\version $Id$ \version $Id$
*/ */
// Pour compatibilité lors de l'upgrade // Pour compatibilité lors de l'upgrade
if (! defined('DOL_DOCUMENT_ROOT')) if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
{ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
define('DOL_DOCUMENT_ROOT', '../..');
}
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
/** /**

View File

@ -26,11 +26,8 @@
\version $Id$ \version $Id$
*/ */
// Pour compatibilité lors de l'upgrade // Pour compatibilité lors de l'upgrade
if (! defined('DOL_DOCUMENT_ROOT')) if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
{ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
define('DOL_DOCUMENT_ROOT', '../..');
}
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
/** /**

View File

@ -30,12 +30,8 @@
*/ */
// Pour compatibilité lors de l'upgrade // Pour compatibilité lors de l'upgrade
if (! defined('DOL_DOCUMENT_ROOT')) if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');
{ if (! defined('ADODB_DATE_VERSION')) include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");
define('DOL_DOCUMENT_ROOT', '..');
}
include_once(DOL_DOCUMENT_ROOT."/includes/adodbtime/adodb-time.inc.php");

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* 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
@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/ */
/** /**
\file htdocs/product/stock/valo.php \file htdocs/product/stock/valo.php
\ingroup stock \ingroup stock
\brief Page de valorisation des stocks \brief Page de valorisation des stocks
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -47,13 +45,17 @@ if ($page < 0) $page = 0;
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$offset = $limit * $page; $offset = $limit * $page;
$year = strftime("%Y",time());
/* /*
* Affichage valorisation par entrepot * View
*/ */
// Affichage valorisation par entrepot
$sql = "SELECT e.rowid as ref, e.label, e.statut, e.lieu, e.valo_pmp as valo"; $sql = "SELECT e.rowid as ref, e.label, e.statut, e.lieu, e.valo_pmp as valo";
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e";
$sql .= " WHERE 1=1 "; $sql .= " WHERE 1=1";
if ($sref) if ($sref)
{ {
$sql .= " AND e.ref like '%".$sref."%'"; $sql .= " AND e.ref like '%".$sref."%'";
@ -63,7 +65,7 @@ if ($sall)
$sql .= " AND (e.label like '%".addslashes($sall)."%' OR e.description like '%".addslashes($sall)."%' OR e.lieu like '%".addslashes($sall)."%' OR e.address like '%".addslashes($sall)."%' OR e.ville like '%".addslashes($sall)."%')"; $sql .= " AND (e.label like '%".addslashes($sall)."%' OR e.description like '%".addslashes($sall)."%' OR e.lieu like '%".addslashes($sall)."%' OR e.address like '%".addslashes($sall)."%' OR e.ville like '%".addslashes($sall)."%')";
} }
$sql .= " ORDER BY $sortfield $sortorder "; $sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit($limit + 1 ,$offset); $sql .= $db->plimit($limit + 1, $offset);
$result = $db->query($sql) ; $result = $db->query($sql) ;
if ($result) if ($result)
@ -115,13 +117,17 @@ if ($result)
print '<br />'; print '<br />';
$year = strftime("%Y",time()); $file='entrepot-'.$year.'.png';
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$year.'.png'; if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/'.$file))
print '<img src="'.$url.'" alt="Valorisation du stock année '.($year).'">'; {
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file='.$file;
print '<img src="'.$url.'" alt="Valorisation du stock année '.($year).'">';
}
if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/entrepot-'.($year-1).'.png')) $file='entrepot-'.($year-1).'.png';
if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/'.$file))
{ {
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.($year-1).'.png'; $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file='.$file;
print '<br /><img src="'.$url.'" alt="Valorisation du stock année '.($year-1).'">'; print '<br /><img src="'.$url.'" alt="Valorisation du stock année '.($year-1).'">';
} }

View File

@ -225,3 +225,4 @@ update llx_actioncomm set datea2 = datea where datea2 is null and percent = 100;
alter table llx_projet modify fk_soc integer; alter table llx_projet modify fk_soc integer;
update llx_rights_def set module='societe' where module='commercial' and perms='client' and subperms='voir';

View File

@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file scripts/cron/stock-graph.php \file scripts/cron/stock-graph.php
\ingroup stock \ingroup stock
\brief Créé le graph de valorisation du stock \brief Créé le graph de valorisation du stock
\version $Id$
*/ */
// Test si mode CLI // Test si mode CLI
@ -42,7 +40,6 @@ $path=eregi_replace($script_file,'',$_SERVER["PHP_SELF"]);
require_once($path."../../htdocs/master.inc.php"); require_once($path."../../htdocs/master.inc.php");
$error=0; $error=0;
$verbose = 0; $verbose = 0;
@ -61,20 +58,12 @@ for ($i = 1 ; $i < sizeof($argv) ; $i++)
$verbose = 3; $verbose = 3;
} }
} }
/*
*
*/
$dir = DOL_DATA_ROOT."/graph/entrepot"; $dir = DOL_DATA_ROOT."/graph/entrepot";
if (!is_dir($dir) ) $result=create_exdir($dir);
{
if (! @mkdir($dir,0755))
{
die ("Can't create $dir\n");
}
}
/*
*
*/
$sql = "SELECT distinct(fk_entrepot)"; $sql = "SELECT distinct(fk_entrepot)";
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot_valorisation"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot_valorisation";
@ -93,6 +82,7 @@ else
{ {
dolibarr_print_error($db,$sql); dolibarr_print_error($db,$sql);
} }
/* /*
* *
*/ */
@ -106,7 +96,7 @@ for ($i = 0 ; $i < strftime('%j',$now) ; $i++)
$values[$key][$i] = 0; $values[$key][$i] = 0;
} }
$values[0][$i] = 0; $values[0][$i] = 0;
$legends[$i] = strftime('%b',mktime(12,12,12,1,1,2006) + ($i * 3600 * 24)); $legends[$i] = strftime('%b',dolibarr_mktime(12,0,0,1,1,2006) + ($i * 3600 * 24));
} }
/* /*
@ -164,7 +154,7 @@ for ($i = $max_day + 1 ; $i < ($day + 1) ; $i++)
require_once DOL_DOCUMENT_ROOT."/../external-libs/Artichow/LinePlot.class.php"; require_once(DOL_DOCUMENT_ROOT."/../external-libs/Artichow/LinePlot.class.php");
foreach ($entrepots as $key => $ent) foreach ($entrepots as $key => $ent)
{ {
@ -190,6 +180,13 @@ if ($total[$key] > 0)
if ($verbose) if ($verbose)
print "$file\n"; print "$file\n";
/** \brief Build graph
* \param file File
* \param title Title
* \param values Value
* \param legends Legend
*/
function graph_datas($file, $title, $values, $legends) function graph_datas($file, $title, $values, $legends)
{ {