Merge pull request #11736 from ptibogxiv/patch-236

NEW display membership in takepos if member link to thirdparty
This commit is contained in:
Laurent Destailleur 2019-08-26 16:37:25 +02:00 committed by GitHub
commit bc5e5be3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,6 +692,40 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep
print '<p style="font-size:120%;" class="right">';
print $langs->trans("Customer").': '.$soc->name;
print '</p>';
// Module Adherent
if (! empty($conf->adherent->enabled))
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$langs->load("members");
print '<p style="font-size:120%;" class="right">';
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 '<br>'.$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 '<span class="opacitymedium">'.$langs->trans("ThirdpartyNotLinkedToMember").'</span>';
}
print '</p>';
}
}
if ($action == "search")