Fix: La date de validation n'était pas renseignée.
This commit is contained in:
parent
3396f775dd
commit
e9b8c7cd11
@ -753,7 +753,7 @@ class Adherent
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||||
$sql.= " statut=1,";
|
$sql.= " statut=1, datevalid = now(),";
|
||||||
$sql.= " fk_user_valid=".$userid;
|
$sql.= " fk_user_valid=".$userid;
|
||||||
$sql.= " WHERE rowid = $this->id";
|
$sql.= " WHERE rowid = $this->id";
|
||||||
|
|
||||||
|
|||||||
@ -121,65 +121,71 @@ if ($result)
|
|||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
if ($_GET["type"] && $i==0) { # Fetch deja fait
|
if ($_GET["type"] && $i==0)
|
||||||
} else {
|
{
|
||||||
$objp = $db->fetch_object($result);
|
# Fetch deja fait
|
||||||
}
|
} else {
|
||||||
|
$objp = $db->fetch_object($result);
|
||||||
|
}
|
||||||
|
|
||||||
$adh=new Adherent($db);
|
$adh=new Adherent($db);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
if ($objp->societe != ''){
|
if ($objp->societe != '')
|
||||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."</a></td>\n";
|
{
|
||||||
}else{
|
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."</a></td>\n";
|
||||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."</a></td>\n";
|
}
|
||||||
}
|
else
|
||||||
print "<td>";
|
{
|
||||||
if ($objp->cotisation == 'yes')
|
print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."</a></td>\n";
|
||||||
|
}
|
||||||
|
print "<td>";
|
||||||
|
if ($objp->cotisation == 'yes')
|
||||||
|
{
|
||||||
|
if ($objp->datefin)
|
||||||
|
{
|
||||||
|
if ($objp->datefin < time() && $objp->statut != 0)
|
||||||
{
|
{
|
||||||
if ($objp->datefin)
|
print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."</td>\n";
|
||||||
{
|
|
||||||
if ($objp->datefin < time())
|
|
||||||
{
|
|
||||||
print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."</td>\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print dolibarr_print_date($objp->datefin)."</td>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print $langs->trans("SubscriptionNotReceived")." ".img_warning()."</td>\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " </td>";
|
print dolibarr_print_date($objp->datefin)."</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<td>$objp->email</td>\n";
|
|
||||||
print '<td><a href="type.php?rowid='.$objp->type_id.'">'.img_object($langs->trans("ShowType"),"group").' '.$objp->type.'</a></td>';
|
|
||||||
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
|
|
||||||
|
|
||||||
// Statut
|
|
||||||
print "<td>";
|
|
||||||
print $adh->LibStatut($objp->statut,2);
|
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print "<td><a href=\"edit.php?rowid=$objp->rowid&action=edit\">".img_edit()."</a> ";
|
|
||||||
print "<a href=\"fiche.php?rowid=$objp->rowid&action=resign\">".img_disable($langs->trans("Resiliate"))."</a> <a href=\"fiche.php?rowid=$objp->rowid&action=delete\">".img_delete()."</a></td>\n";
|
|
||||||
print "</tr>";
|
|
||||||
$i++;
|
|
||||||
}
|
}
|
||||||
print "</table><br>\n";
|
else {
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
|
if ($objp->statut != 0) print " ".img_warning();
|
||||||
print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num);
|
print "</td>\n";
|
||||||
|
}
|
||||||
print "</table><br>\n";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print " </td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<td>$objp->email</td>\n";
|
||||||
|
print '<td><a href="type.php?rowid='.$objp->type_id.'">'.img_object($langs->trans("ShowType"),"group").' '.$objp->type.'</a></td>';
|
||||||
|
print "<td>".$adh->getmorphylib($objp->morphy)."</td>\n";
|
||||||
|
|
||||||
|
// Statut
|
||||||
|
print "<td>";
|
||||||
|
print $adh->LibStatut($objp->statut,4);
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
|
print "<td><a href=\"edit.php?rowid=$objp->rowid&action=edit\">".img_edit()."</a> ";
|
||||||
|
print "<a href=\"fiche.php?rowid=$objp->rowid&action=resign\">".img_disable($langs->trans("Resiliate"))."</a> <a href=\"fiche.php?rowid=$objp->rowid&action=delete\">".img_delete()."</a></td>\n";
|
||||||
|
print "</tr>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table><br>\n";
|
||||||
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
|
print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
|
print "</table><br>\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user