2
0
forked from Wavyzz/dolibarr

Merge pull request #15979 from frederic34/patch-8

member has ref now
This commit is contained in:
Laurent Destailleur
2021-01-16 17:26:52 +01:00
committed by GitHub
2 changed files with 26 additions and 12 deletions

View File

@@ -85,9 +85,15 @@ if ($result) {
$adhtype->label = $objp->label;
$AdherentType[$objp->rowid] = $adhtype;
if ($objp->statut == -1) { $MemberToValidate[$objp->rowid] = $objp->somme; }
if ($objp->statut == 1) { $MembersValidated[$objp->rowid] = $objp->somme; }
if ($objp->statut == 0) { $MembersResiliated[$objp->rowid] = $objp->somme; }
if ($objp->statut == -1) {
$MemberToValidate[$objp->rowid] = $objp->somme;
}
if ($objp->statut == 1) {
$MembersValidated[$objp->rowid] = $objp->somme;
}
if ($objp->statut == 0) {
$MembersResiliated[$objp->rowid] = $objp->somme;
}
$i++;
}
@@ -136,10 +142,14 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is usel
print '<table class="noborder nohover centpercent">';
$i = 0;
foreach ($listofsearchfields as $key => $value) {
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
if ($i == 0) {
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
}
print '<tr class="oddeven">';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
if ($i == 0) {
print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
}
print '</tr>';
$i++;
}
@@ -284,7 +294,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
*/
$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;

View File

@@ -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 {