From ad254368d47c4270012f0e5c8e8fe5cbd12f12af Mon Sep 17 00:00:00 2001 From: daraelmin Date: Fri, 20 Oct 2023 23:21:03 +0200 Subject: [PATCH 1/3] Fix wrong debug log --- htdocs/adherents/class/adherentstats.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index 5075154c4c8ab..8ae8c77146c2b 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -282,7 +282,7 @@ public function countMembersByTagAndStatus($numberYears = 0) $sql .= " GROUP BY c.rowid, c.label"; $sql .= " ORDER BY label ASC"; - dol_syslog("box_members_by_type::select nb of members per type", LOG_DEBUG); + dol_syslog("box_members_by_tag::select nb of members per tag", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { From 475fd6d9891f32461f587a3a798381f47be1e530 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Tue, 24 Oct 2023 22:06:53 +0200 Subject: [PATCH 2/3] Fix suggested end for membership can be in the past MEMBER_SUBSCRIPTION_SUGGEST_END_OF_YEAR and MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH should be based on the subscription start date, not on the creation date --- htdocs/adherents/subscription.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index eb07c7ab048b5..2287c0c080f02 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -990,9 +990,9 @@ } if (!$dateto) { if (getDolGlobalInt('MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH')) { - $dateto = dol_get_last_day($currentyear, $currentmonth); + $dateto = dol_get_last_day(dol_print_date($datefrom, "%Y"),dol_print_date($datefrom, "%m")); } elseif (getDolGlobalInt('MEMBER_SUBSCRIPTION_SUGGEST_END_OF_YEAR')) { - $dateto = dol_get_last_day($currentyear); + $dateto = dol_get_last_day(dol_print_date($datefrom, "%Y")); } else { $dateto = -1; // By default, no date is suggested } From f1f2df8946590de2c5921d5b875e7a909b79587d Mon Sep 17 00:00:00 2001 From: daraelmin Date: Tue, 24 Oct 2023 22:53:22 +0200 Subject: [PATCH 3/3] Fix typo --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 2287c0c080f02..b9cd776c17691 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -990,7 +990,7 @@ } if (!$dateto) { if (getDolGlobalInt('MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH')) { - $dateto = dol_get_last_day(dol_print_date($datefrom, "%Y"),dol_print_date($datefrom, "%m")); + $dateto = dol_get_last_day(dol_print_date($datefrom, "%Y"), dol_print_date($datefrom, "%m")); } elseif (getDolGlobalInt('MEMBER_SUBSCRIPTION_SUGGEST_END_OF_YEAR')) { $dateto = dol_get_last_day(dol_print_date($datefrom, "%Y")); } else {