From 4e537a986b55a507d334c445c9379164d742fea9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sun, 26 Aug 2012 13:07:24 +0200 Subject: [PATCH] Fix: Use bad date. Fix: Autoselect of type. --- htdocs/adherents/fiche.php | 2 +- htdocs/adherents/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 75a9c9a60cf..11e54b35ee0 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -730,7 +730,7 @@ if ($action == 'create') $listetype=$adht->liste_array(); if (count($listetype)) { - print $form->selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, 1); + print $form->selectarray("typeid", $listetype, GETPOST('typeid','int')?GETPOST('typeid','int'):$typeid, count($listetype)>1?1:0); } else { print '<font class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</font>'; } diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index fff160275bb..b30ac8e6f84 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -247,7 +247,7 @@ if ($resql) $statictype->libelle=$obj->libelle; print '<td>'.$staticmember->getNomUrl(1,24).'</td>'; print '<td>'.$statictype->getNomUrl(1,16).'</td>'; - print '<td>'.dol_print_date($db->jdate($obj->date_end),'dayhour').'</td>'; + print '<td>'.dol_print_date($db->jdate($obj->date_end_subscription),'dayhour').'</td>'; print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>'; print '</tr>'; $i++; -- GitLab