Fix: La date de validation n'était pas renseignée.

This commit is contained in:
Laurent Destailleur 2006-03-23 16:31:41 +00:00
parent 3396f775dd
commit e9b8c7cd11
2 changed files with 57 additions and 51 deletions

View File

@ -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";

View File

@ -121,7 +121,9 @@ 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)
{
# Fetch deja fait
} else { } else {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
} }
@ -130,9 +132,12 @@ if ($result)
$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"; 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{ }
else
{
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><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."</a></td>\n";
} }
print "<td>"; print "<td>";
@ -140,7 +145,7 @@ if ($result)
{ {
if ($objp->datefin) if ($objp->datefin)
{ {
if ($objp->datefin < time()) if ($objp->datefin < time() && $objp->statut != 0)
{ {
print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."</td>\n"; print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."</td>\n";
} }
@ -150,7 +155,9 @@ if ($result)
} }
} }
else { else {
print $langs->trans("SubscriptionNotReceived")." ".img_warning()."</td>\n"; print $langs->trans("SubscriptionNotReceived");
if ($objp->statut != 0) print " ".img_warning();
print "</td>\n";
} }
} }
else else
@ -164,7 +171,7 @@ if ($result)
// Statut // Statut
print "<td>"; print "<td>";
print $adh->LibStatut($objp->statut,2); print $adh->LibStatut($objp->statut,4);
print "</td>"; print "</td>";
print "<td><a href=\"edit.php?rowid=$objp->rowid&action=edit\">".img_edit()."</a> &nbsp; "; print "<td><a href=\"edit.php?rowid=$objp->rowid&action=edit\">".img_edit()."</a> &nbsp; ";
@ -178,8 +185,7 @@ if ($result)
print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num); print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num);
print "</table><br>\n"; print "</table><br>\n";
}
}
else else
{ {
dolibarr_print_error($db); dolibarr_print_error($db);