From 965eb2d6397025e8ddf72501d4f46185a1aed744 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Thu, 29 Apr 2021 22:57:39 +0200 Subject: [PATCH 1/3] Fix logical test always false subscription is an integer and is set to 0 or 1. So subscription is never equal to "yes" --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 838e7cd9a5c..dad19ffafcd 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -857,7 +857,7 @@ while ($i < min($num, $limit)) else { print ''; - if ($obj->subscription == 'yes') + if (!empty($obj->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($obj->statut > 0) print " ".img_warning(); From 4174ebd9c0023bdda8ad1d9899a8a1a003aeb19b Mon Sep 17 00:00:00 2001 From: daraelmin Date: Thu, 29 Apr 2021 23:11:51 +0200 Subject: [PATCH 2/3] Fix subscription =="yes" --- htdocs/adherents/type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 4590254ebf6..81e387b8dbb 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -710,7 +710,7 @@ if ($rowid > 0) else { print ''; - if ($objp->subscription == 'yes') + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning(); From 749aeeb233f26cdf1af9f3de6edcae140296af45 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Thu, 29 Apr 2021 23:16:21 +0200 Subject: [PATCH 3/3] Fix $objp->subscription =="yes" --- htdocs/societe/societecontact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 8874a62bc3b..4a8879c60bd 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -331,7 +331,7 @@ if ($id > 0 || ! empty($ref)) else { print ''; - if ($objp->subscription == 'yes') + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning();