Merge pull request #1791 from frederic34/patch-graphbox

External user must not have graph box with all stats
This commit is contained in:
Laurent Destailleur 2014-07-31 17:51:31 +02:00
commit 202774de0b
5 changed files with 5 additions and 10 deletions

View File

@ -114,11 +114,10 @@ class box_graph_invoices_permonth extends ModeleBoxes
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='customer';
$userid=0;
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0));
$stats = new FactureStats($this->db, $socid, $mode, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)

View File

@ -113,11 +113,10 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='supplier';
$userid=0;
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0));
$stats = new FactureStats($this->db, $socid, $mode, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)

View File

@ -114,11 +114,10 @@ class box_graph_orders_permonth extends ModeleBoxes
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='customer';
$userid=0;
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0));
$stats = new CommandeStats($this->db, $socid, $mode, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)

View File

@ -113,11 +113,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='supplier';
$userid=0;
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0));
$stats = new CommandeStats($this->db, $socid, $mode, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)

View File

@ -114,11 +114,10 @@ class box_graph_propales_permonth extends ModeleBoxes
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='customer';
$userid=0;
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new PropaleStats($this->db, 0, $mode, ($userid>0?$userid:0));
$stats = new PropaleStats($this->db, $socid, $mode, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)