diff --git a/ChangeLog b/ChangeLog
index 5dc6b2eab0d..31c029f2a1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,7 @@ For users:
- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count.
- Fix: [ bug #1022 ] correct margin calculation for credit notes.
- Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases).
+- Fix: Lost stats filters into year selection.
New experimental module:
- New: [ task #157 ] Add a Skype button (adherents / third parties / contacts)
diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php
index b3b8379afc3..e0805d385e6 100644
--- a/htdocs/comm/propal/stats/index.php
+++ b/htdocs/comm/propal/stats/index.php
@@ -267,14 +267,14 @@ foreach ($data as $val)
{ // If we have empty year
$oldyear--;
print '
';
- print '| '.$oldyear.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.' | ';
print '0 | ';
print '0 | ';
print '0 | ';
print '
';
}
print '';
- print '| '.$year.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.' | ';
print ''.$val['nb'].' | ';
print ''.price(price2num($val['total'],'MT'),1).' | ';
print ''.price(price2num($val['avg'],'MT'),1).' | ';
diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index 31cb0566934..a7b51fb5fb0 100644
--- a/htdocs/commande/stats/index.php
+++ b/htdocs/commande/stats/index.php
@@ -288,7 +288,7 @@ foreach ($data as $val)
{ // If we have empty year
$oldyear--;
print '
';
- print '| '.$oldyear.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.' | ';
print '0 | ';
print '0 | ';
@@ -297,7 +297,7 @@ foreach ($data as $val)
}
print '
';
- print '| '.$year.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.' | ';
print ''.$val['nb'].' | ';
print ''.price(price2num($val['total'],'MT'),1).' | ';
print ''.price(price2num($val['avg'],'MT'),1).' | ';
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 211bc355cc6..51747fe04d2 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2003-2006 Rodolphe Quiedeville
* Copyright (c) 2004-2012 Laurent Destailleur
* Copyright (C) 2012 Marcos GarcĂa
+ * Copyright (C) 2013 Juanjo Menent
*
* 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
@@ -266,14 +267,14 @@ foreach ($data as $val)
{ // If we have empty year
$oldyear--;
print '';
- print '| '.$oldyear.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.' | ';
print '0 | ';
print '0 | ';
print '0 | ';
print '
';
}
print '';
- print '| '.$year.' | ';
+ print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.' | ';
print ''.$val['nb'].' | ';
print ''.price(price2num($val['total'],'MT'),1).' | ';
print ''.price(price2num($val['avg'],'MT'),1).' | ';