';
*/
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
-$sql = "SELECT a.rowid, a.statut as status, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
+$sql = "SELECT a.rowid, a.ref, a.statut as status, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql .= " a.gender, a.email, a.photo, a.morphy,";
$sql .= " a.tms as datem, a.datefin as date_end_subscription,";
$sql .= " ta.rowid as typeid, ta.libelle as label, ta.subscription as need_subscription";
@@ -308,7 +318,7 @@ if ($resql) {
$obj = $db->fetch_object($resql);
$staticmember->id = $obj->rowid;
- $staticmember->ref = $obj->rowid;
+ $staticmember->ref = $obj->ref;
$staticmember->lastname = $obj->lastname;
$staticmember->firstname = $obj->firstname;
$staticmember->gender = $obj->gender;
diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php
index 2d0ad45a266..2a69c7b3a21 100644
--- a/htdocs/core/boxes/box_members.php
+++ b/htdocs/core/boxes/box_members.php
@@ -63,7 +63,9 @@ class box_members extends ModeleBoxes
// disable module for such cases
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
- if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) $this->enabled = 0; // disabled for external users
+ if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
+ $this->enabled = 0; // disabled for external users
+ }
$this->hidden = !($user->rights->adherent->lire);
}
@@ -87,7 +89,7 @@ class box_members extends ModeleBoxes
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedMembers", $max));
if ($user->rights->adherent->lire) {
- $sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
+ $sql = "SELECT a.rowid, a.ref, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql .= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
$sql .= ' a.photo, a.email, a.gender, a.morphy,';
$sql .= " t.subscription";
@@ -110,14 +112,15 @@ class box_members extends ModeleBoxes
$memberstatic->lastname = $objp->lastname;
$memberstatic->firstname = $objp->firstname;
$memberstatic->id = $objp->rowid;
- $memberstatic->ref = $objp->rowid;
+ $memberstatic->ref = $objp->ref;
$memberstatic->photo = $objp->photo;
$memberstatic->gender = $objp->gender;
$memberstatic->email = $objp->email;
$memberstatic->morphy = $objp->morphy;
$memberstatic->company = $objp->company;
$memberstatic->statut = $objp->status;
-
+ $memberstatic->need_subscription = $objp->subscription;
+ $memberstatic->datefin = $this->db->jdate($objp->date_end_subscription);
if (!empty($objp->fk_soc)) {
$memberstatic->socid = $objp->fk_soc;
$memberstatic->fetch_thirdparty();
@@ -151,11 +154,12 @@ class box_members extends ModeleBoxes
$line++;
}
- if ($num == 0)
+ if ($num == 0) {
$this->info_box_contents[$line][0] = array(
'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedCustomers"),
);
+ }
$this->db->free($result);
} else {