From 21c51eb3d22f128a43da1afd609d3965073a191a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 15 Sep 2019 21:01:29 +0200 Subject: [PATCH] Update invoice.php --- htdocs/takepos/invoice.php | 45 +++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index a1882b1964b..8512beee2ee 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -698,9 +698,52 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep $soc = new Societe($db); if ($invoice->socid > 0) $soc->fetch($invoice->socid); else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); - print '

'; + print '

'; print $langs->trans("Customer").': '.$soc->name; + + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; + if (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") + { + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; + $warehouse = new Entrepot($db); + $warehouse->fetch($conf->global->$constantforkey); + print '
'.$langs->trans("Warehouse").': '.$warehouse->ref; + } 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 '
'.$langs->trans("SubscriptionEndDate").': '.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 '

'; + } } if ($action == "search")