diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 187fee22dfeb729fb3d7786b28a97798728334af..ac09e1864b6d6781fcb81c6006b9705816e3d193 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1485,6 +1485,30 @@ else print $object->showOptionals($extrafields, 'view', $parameters); } + // Date end subscription + print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">'; + if ($object->datefin) + { + print dol_print_date($object->datefin,'day'); + if ($object->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } + } + else + { + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + } + } + print '</td></tr>'; + // Third party Dolibarr if (! empty($conf->societe->enabled)) { @@ -1555,30 +1579,6 @@ else } print '</td></tr>'; - // Date end subscription - print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">'; - if ($object->datefin) - { - print dol_print_date($object->datefin,'day'); - if ($object->hasDelay()) { - print " ".img_warning($langs->trans("Late")); - } - } - else - { - if (! $adht->cotisation) - { - print $langs->trans("SubscriptionNotRecorded"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } - else - { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } - } - print '</td></tr>'; - print "</table>\n"; print "</div></div></div>\n"; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index dcc8b671259b59ed130ab181dad0171a81f75360..1299f2400dcf87ea5605c4749f6b17231705daa1 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -652,6 +652,30 @@ if ($rowid > 0) print $object->showOptionals($extrafields, 'view', $parameters); } + // Date end subscription + print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">'; + if ($object->datefin) + { + print dol_print_date($object->datefin,'day'); + if ($object->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } + } + else + { + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + } + print '</td></tr>'; + // Third party Dolibarr if (! empty($conf->societe->enabled)) { @@ -722,30 +746,6 @@ if ($rowid > 0) } print '</td></tr>'; - // Date end subscription - print '<tr><td>'.$langs->trans("SubscriptionEndDate").'</td><td class="valeur">'; - if ($object->datefin) - { - print dol_print_date($object->datefin,'day'); - if ($object->hasDelay()) { - print " ".img_warning($langs->trans("Late")); - } - } - else - { - if (! $adht->cotisation) - { - print $langs->trans("SubscriptionNotRecorded"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie - } - else - { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie - } - } - print '</td></tr>'; - print "</table>\n"; print "</div></div></div>\n"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index b035358716e6c49279b94f7f3b15ad2ebae5402c..032628e4e673235d0969408b5979361954ea68c7 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1442,6 +1442,49 @@ else print '</td></tr>'; } + // Multicompany + // TODO This should be done with hook formObjectOption + if (is_object($mc)) + { + if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + { + print '<tr><td>'.$langs->trans("Entity").'</td><td>'; + if (empty($object->entity)) + { + print $langs->trans("AllEntities"); + } + else + { + $mc->getInfo($object->entity); + print $mc->label; + } + print "</td></tr>\n"; + } + } + + if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) + { + print '<tr><td>'.$langs->trans("OpenIDURL").'</td>'; + print '<td>'.$object->openid.'</td>'; + print "</tr>\n"; + } + + print '<tr><td class="titlefield">'.$langs->trans("LastConnexion").'</td>'; + print '<td>'.dol_print_date($object->datelastlogin,"dayhour").'</td>'; + print "</tr>\n"; + + print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>'; + print '<td>'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>'; + print "</tr>\n"; + + // Other attributes + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields); + } + // Company / Contact if (! empty($conf->societe->enabled)) { @@ -1490,49 +1533,6 @@ else print '</tr>'."\n"; } - // Multicompany - // TODO This should be done with hook formObjectOption - if (is_object($mc)) - { - if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) - { - print '<tr><td>'.$langs->trans("Entity").'</td><td>'; - if (empty($object->entity)) - { - print $langs->trans("AllEntities"); - } - else - { - $mc->getInfo($object->entity); - print $mc->label; - } - print "</td></tr>\n"; - } - } - - if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) - { - print '<tr><td>'.$langs->trans("OpenIDURL").'</td>'; - print '<td>'.$object->openid.'</td>'; - print "</tr>\n"; - } - - print '<tr><td class="titlefield">'.$langs->trans("LastConnexion").'</td>'; - print '<td>'.dol_print_date($object->datelastlogin,"dayhour").'</td>'; - print "</tr>\n"; - - print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>'; - print '<td>'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>'; - print "</tr>\n"; - - // Other attributes - $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - print $object->showOptionals($extrafields); - } - print "</table>\n"; print '</div>';