diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 9961471fdd6..cf85e7b2acf 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -705,6 +705,7 @@ if ($rowid > 0) print "\n"; $accountstatic=new Account($db); + $adht = new AdherentType($db); while ($i < $num) { @@ -713,14 +714,19 @@ if ($rowid > 0) $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - $adht = new AdherentType($db); - $adht->fetch($objp->cfk_type); + if ($objp->cfk_type > 0) + { + $adht->fetch($objp->cfk_type); + } print ''; print ''.$subscriptionstatic->getNomUrl(1).''; print ''.dol_print_date($db->jdate($objp->datec), 'dayhour')."\n"; print ''; - if ( ! empty($objp->cfk_type) ) print $adht->getNomUrl(1); + if ($objp->cfk_type > 0) + { + print $adht->getNomUrl(1); + } print ''; print ''.dol_print_date($db->jdate($objp->dateh), 'day')."\n"; print ''.dol_print_date($db->jdate($objp->datef), 'day')."\n";