develop

Conflicts:
	htdocs/install/mysql/migration/3.3.0-3.4.0.sql

Change-Id: I2196e69ebae5a057eb6df018b683ff35f721ead9
This commit is contained in:
fhenry 2013-04-05 11:46:09 +02:00
commit dcd960a957
10 changed files with 77 additions and 41 deletions

View File

@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
@ -143,8 +143,7 @@ $head = member_stats_prepare_head($adh);
dol_fiche_head($head, 'statssubscription', $langs->trans("Statistics"), 0, 'user');
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
@ -210,8 +209,8 @@ foreach ($data as $val)
print '</table>';
print '</td>';
print '<td align="center" valign="top">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Show graphs
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
@ -223,7 +222,10 @@ else {
}
print '</td></tr></table>';
print '</td></tr></table>';
print '</div></div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();

View File

@ -28,8 +28,8 @@ require '../../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
@ -216,8 +216,9 @@ complete_head_from_modules($conf,$langs,null,$head,$h,'propal_stats');
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
//if (empty($socid))
//{
@ -282,8 +283,8 @@ foreach ($data as $val)
print '</table>';
print '</td>';
print '<td align="center" valign="top">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Show graphs
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
@ -297,7 +298,10 @@ else {
}
print '</td></tr></table>';
print '</td></tr></table>';
print '</div></div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (c) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
*
@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$mode=GETPOST("mode")?GETPOST("mode"):'customer';
if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden();
@ -237,8 +237,9 @@ complete_head_from_modules($conf,$langs,null,$head,$h,$type);
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
//if (empty($socid))
//{
@ -305,8 +306,8 @@ foreach ($data as $val)
print '</table>';
print '</td>';
print '<td align="center" valign="top">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Show graphs
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
@ -320,7 +321,9 @@ else {
}
print '</td></tr></table>';
print '</td></tr></table>';
print '</div></div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();

View File

@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacementstats.class
$langs->load("trips");
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
@ -204,8 +204,9 @@ complete_head_from_modules($conf,$langs,null,$head,$h,'trip_stats');
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
@ -266,8 +267,8 @@ foreach ($data as $val)
print '</table>';
print '</td>';
print '<td align="center" valign="top">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Show graphs
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
@ -281,7 +282,10 @@ else {
}
print '</td></tr></table>';
print '</td></tr></table>';
print '</div></div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();

View File

@ -27,8 +27,8 @@ require '../../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$mode=GETPOST("mode")?GETPOST("mode"):'customer';
if ($mode == 'customer' && ! $user->rights->facture->lire) accessforbidden();
@ -214,8 +214,9 @@ complete_head_from_modules($conf,$langs,null,$head,$h,$type);
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<table class="notopnoleftnopadd" width="100%"><tr>';
print '<td align="center" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
//if (empty($socid))
//{
@ -280,8 +281,8 @@ foreach ($data as $val)
print '</table>';
print '</td>';
print '<td align="center" valign="top">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Show graphs
print '<table class="border" width="100%"><tr valign="top"><td align="center">';
@ -295,7 +296,10 @@ else {
}
print '</td></tr></table>';
print '</td></tr></table>';
print '</div></div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end();

View File

@ -785,7 +785,7 @@ class DolGraph
$this->_stringtoshow ='<!-- Build using '.$this->_library.' -->'."\n";
$this->_stringtoshow.='<br><div align="center">'.$this->title.'</div><br>';
$this->_stringtoshow.='<div id="placeholder_'.$tag.'" style="width:'.$this->width.'px;height:'.$this->height.'px;"></div>'."\n";
$this->_stringtoshow.='<div id="placeholder_'.$tag.'" style="width:'.$this->width.'px;height:'.$this->height.'px;" class="dolgraph"></div>'."\n";
$this->_stringtoshow.='<script id="'.$tag.'">'."\n";
$this->_stringtoshow.='$(function () {'."\n";
$i=$firstlot;
@ -893,6 +893,21 @@ class DolGraph
{
return $this->_stringtoshow;
}
/**
* getDefaultGraphSizeForStats
*
* @param string $direction 'width' or 'height'
* @return int Value of width or height to use by default
*/
static function getDefaultGraphSizeForStats($direction)
{
global $conf;
if ($direction == 'width') return ($conf->dol_optimize_smallscreen?'400':'500');
if ($direction == 'height') return ($conf->dol_optimize_smallscreen?'160':'200');
return 0;
}
}
?>

View File

@ -535,7 +535,7 @@ class Menubase
if ($menu['perms'])
{
$tmpcond=$menu['perms'];
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z]+/','1==1',$tmpcond); // Force part of condition to true
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true
$perms = verifCond($tmpcond);
//print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$perms."<br>\n";
}
@ -545,7 +545,7 @@ class Menubase
if ($menu['enabled'])
{
$tmpcond=$menu['enabled'];
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z]+/','1==1',$tmpcond); // Force part of condition to true
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true
$enabled = verifCond($tmpcond);
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1;
//print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$enabled."<br>\n";

View File

@ -34,8 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
llxHeader();
$WIDTH=500;
$HEIGHT=200;
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height');
$mesg = '';

View File

@ -210,6 +210,7 @@ ALTER TABLE llx_user ADD COLUMN fk_state integer DEFAULT 0;
ALTER TABLE llx_user ADD COLUMN fk_country integer DEFAULT 0;
ALTER TABLE llx_product_price ADD COLUMN import_key varchar(14) AFTER price_by_qty;
CREATE TABLE llx_printer_ipp
(
rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
@ -221,3 +222,5 @@ CREATE TABLE llx_printer_ipp
login varchar(32) NOT NULL,
)ENGINE=innodb;
ALTER TABLE llx_socpeople ADD COLUMN ref_ext varchar(128) after entity;

View File

@ -25,6 +25,7 @@ create table llx_socpeople
tms timestamp,
fk_soc integer, -- lien vers la societe
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
civilite varchar(6),
lastname varchar(50),
firstname varchar(50),