Qual: Rename status
This commit is contained in:
parent
d48bfc3fcb
commit
47e530b801
@ -1101,11 +1101,11 @@ class Adherent extends CommonObject
|
|||||||
if ($this->statut == 1)
|
if ($this->statut == 1)
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Adherent::validate statut of member does not allow this", LOG_WARNING);
|
dolibarr_syslog("Adherent::validate statut of member does not allow this", LOG_WARNING);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||||
$sql.= " statut=1, datevalid = ".$this->db->idate(mktime()).",";
|
$sql.= " statut=1, datevalid = ".$this->db->idate(mktime()).",";
|
||||||
$sql.= " fk_user_valid=".$user->id;
|
$sql.= " fk_user_valid=".$user->id;
|
||||||
@ -1150,9 +1150,9 @@ class Adherent extends CommonObject
|
|||||||
if ($this->statut == 0)
|
if ($this->statut == 0)
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Adherent::resiliate statut of member does not allow this", LOG_WARNING);
|
dolibarr_syslog("Adherent::resiliate statut of member does not allow this", LOG_WARNING);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||||
@ -1603,25 +1603,25 @@ class Adherent extends CommonObject
|
|||||||
}
|
}
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return $langs->trans("MemberStatusDraft");
|
if ($statut == -1) return $langs->trans("MemberStatusDraftShort");
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
{
|
{
|
||||||
if (! $date_end_subscription) return $langs->trans("MemberStatusActiveShort");
|
if (! $date_end_subscription) return $langs->trans("MemberStatusActiveShort");
|
||||||
elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLateShort");
|
elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLateShort");
|
||||||
else return $langs->trans("MemberStatusPayedShort");
|
else return $langs->trans("MemberStatusPayedShort");
|
||||||
}
|
}
|
||||||
if ($statut == 0) return $langs->trans("MemberStatusResiliated");
|
if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort");
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft");
|
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort");
|
||||||
if ($statut >= 1)
|
if ($statut >= 1)
|
||||||
{
|
{
|
||||||
if (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'),'statut1').' '.$langs->trans("MemberStatusActiveShort");
|
if (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'),'statut1').' '.$langs->trans("MemberStatusActiveShort");
|
||||||
elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'),'statut3').' '.$langs->trans("MemberStatusActiveLateShort");
|
elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'),'statut3').' '.$langs->trans("MemberStatusActiveLateShort");
|
||||||
else return img_picto($langs->trans('MemberStatusPayed'),'statut4').' '.$langs->trans("MemberStatusPayedShort");
|
else return img_picto($langs->trans('MemberStatusPayed'),'statut4').' '.$langs->trans("MemberStatusPayedShort");
|
||||||
}
|
}
|
||||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated");
|
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort");
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
@ -1700,7 +1700,7 @@ class Adherent extends CommonObject
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$now=gmmktime();
|
$now=gmmktime();
|
||||||
|
|
||||||
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
||||||
|
|
||||||
$this->nbtodo=$this->nbtodolate=0;
|
$this->nbtodo=$this->nbtodolate=0;
|
||||||
@ -1848,7 +1848,7 @@ class Adherent extends CommonObject
|
|||||||
$sql.= ' a.fk_user_author, a.fk_user_valid, a.fk_user_mod';
|
$sql.= ' a.fk_user_author, a.fk_user_valid, a.fk_user_mod';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'adherent as a';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'adherent as a';
|
||||||
$sql.= ' WHERE a.rowid = '.$id;
|
$sql.= ' WHERE a.rowid = '.$id;
|
||||||
|
|
||||||
dolibarr_syslog("Adherent::info sql=".$sql, LOG_DEBUG);
|
dolibarr_syslog("Adherent::info sql=".$sql, LOG_DEBUG);
|
||||||
$result=$this->db->query($sql);
|
$result=$this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,7 +18,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/adherents/liste.php
|
* \file htdocs/adherents/liste.php
|
||||||
* \ingroup adherent
|
* \ingroup adherent
|
||||||
* \brief Page to list all members of fundation
|
* \brief Page to list all members of fundation
|
||||||
@ -77,7 +77,7 @@ $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
|
|||||||
$sql.= " t.libelle as type, t.cotisation";
|
$sql.= " t.libelle as type, t.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql.=" AND (d.prenom like '%".$sall."%' OR d.nom like '%".$sall."%' OR d.societe like '%".$sall."%'";
|
$sql.=" AND (d.prenom like '%".$sall."%' OR d.nom like '%".$sall."%' OR d.societe like '%".$sall."%'";
|
||||||
$sql.=" OR d.email like '%".$sall."%' OR d.login like '%".$sall."%' OR d.adresse like '%".$sall."%'";
|
$sql.=" OR d.email like '%".$sall."%' OR d.login like '%".$sall."%' OR d.adresse like '%".$sall."%'";
|
||||||
@ -88,7 +88,7 @@ if ($_REQUEST["type"] > 0)
|
|||||||
$sql.=" AND t.rowid=".$_REQUEST["type"];
|
$sql.=" AND t.rowid=".$_REQUEST["type"];
|
||||||
}
|
}
|
||||||
if (isset($_GET["statut"]))
|
if (isset($_GET["statut"]))
|
||||||
{
|
{
|
||||||
$sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre s<>par<61>s par virgules
|
$sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre s<>par<61>s par virgules
|
||||||
}
|
}
|
||||||
if ( $_POST["action"] == 'search')
|
if ( $_POST["action"] == 'search')
|
||||||
@ -117,19 +117,19 @@ if ($filter == 'outofdate')
|
|||||||
{
|
{
|
||||||
$sql.=" AND datefin < ".$db->idate(mktime());
|
$sql.=" AND datefin < ".$db->idate(mktime());
|
||||||
}
|
}
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = 0;
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
}
|
}
|
||||||
// Add order and limit
|
// Add order and limit
|
||||||
$sql.= " ".$db->order($sortfield,$sortorder);
|
$sql.= " ".$db->order($sortfield,$sortorder);
|
||||||
$sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
|
$sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -148,7 +148,7 @@ if ($resql)
|
|||||||
$titre=$langs->trans("MembersListQualified");
|
$titre=$langs->trans("MembersListQualified");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST["type"] > 0)
|
if ($_REQUEST["type"] > 0)
|
||||||
{
|
{
|
||||||
$membertype=new AdherentType($db);
|
$membertype=new AdherentType($db);
|
||||||
$result=$membertype->fetch($_REQUEST["type"]);
|
$result=$membertype->fetch($_REQUEST["type"]);
|
||||||
@ -167,7 +167,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -190,7 +190,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="8"></td>';
|
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="8"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$listetype=$membertypestatic->liste_array();
|
$listetype=$membertypestatic->liste_array();
|
||||||
$form->select_array("type", $listetype, $_REQUEST["type"], 1, 0, 0, 0, '', 0, 12);
|
$form->select_array("type", $listetype, $_REQUEST["type"], 1, 0, 0, 0, '', 0, 12);
|
||||||
@ -229,7 +229,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.$objp->prenom." ".$objp->nom."</a></td>\n";
|
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.$objp->prenom." ".$objp->nom."</a></td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print "<td>".$objp->login."</td>\n";
|
print "<td>".$objp->login."</td>\n";
|
||||||
|
|
||||||
@ -239,13 +239,13 @@ if ($resql)
|
|||||||
$membertypestatic->libelle=$objp->type;
|
$membertypestatic->libelle=$objp->type;
|
||||||
print $membertypestatic->getNomUrl(1,12);
|
print $membertypestatic->getNomUrl(1,12);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Moral/Physique
|
// Moral/Physique
|
||||||
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
|
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,2);
|
print $adh->LibStatut($objp->statut,$objp->cotisation,$objp->datefin,2);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ MembersTypes=Members types
|
|||||||
MembersAttributes=Members attributes
|
MembersAttributes=Members attributes
|
||||||
SearchAMember=Search a member
|
SearchAMember=Search a member
|
||||||
MemberStatusDraft=Draft (needs to be validated)
|
MemberStatusDraft=Draft (needs to be validated)
|
||||||
MemberStatusDraftShort=To validate
|
MemberStatusDraftShort=Draft
|
||||||
MemberStatusActive=Validated (waiting subscription)
|
MemberStatusActive=Validated (waiting subscription)
|
||||||
MemberStatusActiveShort=Validated
|
MemberStatusActiveShort=Validated
|
||||||
MemberStatusActiveLate=subscription expired
|
MemberStatusActiveLate=subscription expired
|
||||||
|
|||||||
@ -44,7 +44,7 @@ MembersTypes=Types d'adhérents
|
|||||||
MembersAttributes=Attributs adhérents
|
MembersAttributes=Attributs adhérents
|
||||||
SearchAMember=Rechercher un membre
|
SearchAMember=Rechercher un membre
|
||||||
MemberStatusDraft=Brouillon (à valider)
|
MemberStatusDraft=Brouillon (à valider)
|
||||||
MemberStatusDraftShort=A valider
|
MemberStatusDraftShort=Brouillon
|
||||||
MemberStatusActive=Validé (attente adhésion)
|
MemberStatusActive=Validé (attente adhésion)
|
||||||
MemberStatusActiveShort=Validé
|
MemberStatusActiveShort=Validé
|
||||||
MemberStatusActiveLate=Adhésion non à jour
|
MemberStatusActiveLate=Adhésion non à jour
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user