diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 17805a6b060..663c7d4d006 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -692,6 +692,40 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep print '
'; print $langs->trans("Customer").': '.$soc->name; print '
'; + + // Module Adherent + if (! empty($conf->adherent->enabled)) + { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + $langs->load("members"); + print '';
+ print $langs->trans("Member").': ';
+ $adh=new Adherent($db);
+ $result=$adh->fetch('', '', $invoice->socid);
+ if ($result > 0)
+ {
+ $adh->ref=$adh->getFullName($langs);
+ print $adh->getFullName($langs);
+ print '
'.$langs->trans("Type").': '.$adh->type;
+ if ($adh->datefin)
+ {
+ print dol_print_date($adh->datefin, 'day');
+ if ($adh->hasDelay()) {
+ print " ".img_warning($langs->trans("Late"));
+ }
+ }
+ else
+ {
+ print $langs->trans("SubscriptionNotReceived");
+ if ($adh->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
+ }
+ }
+ else
+ {
+ print ''.$langs->trans("ThirdpartyNotLinkedToMember").'';
+ }
+ print '