Merge pull request #19298 from daraelmin/daraelmin-stats-2

Fix Bad count of subscription by year
This commit is contained in:
Laurent Destailleur 2021-11-05 13:06:17 +01:00 committed by GitHub
commit a0fffbae04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ class box_members_subscriptions_by_year extends ModeleBoxes
$i = 0;
while ($i < $num) {
$objp = $this->db->fetch_object($result);
$year = dol_print_date($this->db->jdate($objp->dateh), "%Y", 'gmt');
$year = dol_print_date($this->db->jdate($objp->dateh), "%Y");
$Total[$year] = (isset($Total[$year]) ? $Total[$year] : 0) + $objp->subscription;
$Number[$year] = (isset($Number[$year]) ? $Number[$year] : 0) + 1;
$tot += $objp->subscription;