Fixed more average amount graph stats. They include:
* Customer's orders * Supplier's orders * Customer's invoices * Trips and expense Conflicts: htdocs/commande/stats/index.php
This commit is contained in:
parent
f1cbb10edc
commit
40660482d4
@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -168,12 +170,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = $stats->getAverageByMonth($year);
|
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@ -193,8 +190,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i=$startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -137,12 +138,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = $stats->getAverageByMonth($year);
|
$res = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@ -162,8 +158,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i = $startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -148,12 +149,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = $stats->getAverageByMonth($year);
|
$res = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@ -173,8 +169,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i = $startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user