Fix Bad count of subscription by year

If
This commit is contained in:
daraelmin 2021-11-03 13:12:33 +01:00 committed by GitHub
parent b4895c4dd2
commit d334fe1292
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;