Amlioration gestion erreur

This commit is contained in:
Laurent Destailleur 2006-11-26 07:58:58 +00:00
parent e7e2e6a399
commit 2a3650febc
2 changed files with 4 additions and 2 deletions

View File

@ -371,7 +371,7 @@ class Adherent
}
else
{
dolibarr_print_error($this->db);
$this->error=$this->db->error();
return -1;
}
}
@ -808,6 +808,7 @@ class Adherent
else
{
$this->error=$this->db->error();
dolibarr_syslog("Adherent.class::cotisation error ".$this->error);
$this->db->rollback();
return -2;
}
@ -815,6 +816,7 @@ class Adherent
else
{
$this->error=$this->db->error();
dolibarr_syslog("Adherent.class::cotisation error ".$this->error);
$this->db->rollback();
return -1;
}

View File

@ -158,7 +158,6 @@ if ($result >= 0)
}
}
$member->naiss=dolibarr_mktime($ldapuser[$conf->global->LDAP_FIELD_BIRTHDATE][0]);
$member->datefin=dolibarr_mktime($ldapuser["prnxlastcontribution"][0]),1,'y');
// Propriete type membre
$member->typeid=$typeid;
@ -192,6 +191,7 @@ if ($result >= 0)
}
if ($datelast)
{
// Cree derniere cotisation et met a jour datefin dans adherent
$price=price2num($ldapuser["prnxlastcontributionprice"][0]);
$crowid=$member->cotisation(dolibarr_time_plus_duree($datelast,-1,'y'), $price, 0, $operation, $label, $num_chq);
}