diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 412b76ea15e..5d992b168d4 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -70,7 +70,7 @@ class AdherentType extends CommonObject * @var string Adherent type nature */ public $morphy; - + public $duration; /* @@ -385,9 +385,9 @@ class AdherentType extends CommonObject $sql.= "SET "; $sql.= "statut = ".$this->statut.","; $sql.= "libelle = '".$this->db->escape($this->label) ."',"; - $sql.= "morphy = '".$this->db->escape($this->morphy) ."',"; + $sql.= "morphy = '".$this->db->escape($this->morphy) ."',"; $sql.= "subscription = '".$this->db->escape($this->subscription)."',"; - $sql.= "duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."',"; + $sql.= "duration = '" . $this->db->escape($this->duration_value . $this->duration_unit) ."',"; $sql.= "note = '".$this->db->escape($this->note)."',"; $sql.= "vote = ".(integer) $this->db->escape($this->vote).","; $sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'"; @@ -507,9 +507,9 @@ class AdherentType extends CommonObject $this->label = $obj->label; $this->morphy = $obj->morphy; $this->statut = $obj->statut; - $this->duration = $obj->duration; - $this->duration_value = substr($obj->duration, 0, dol_strlen($obj->duration)-1); - $this->duration_unit = substr($obj->duration, -1); + $this->duration = $obj->duration; + $this->duration_value = substr($obj->duration, 0, dol_strlen($obj->duration)-1); + $this->duration_unit = substr($obj->duration, -1); $this->subscription = $obj->subscription; $this->mail_valid = $obj->mail_valid; $this->note = $obj->note; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 139f4b1fb73..97b0eae7ed0 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -107,11 +107,11 @@ if ($cancel) { if ($action == 'add' && $user->rights->adherent->configurer) { $object->label = trim($label); - $object->morphy = trim($morphy); + $object->morphy = trim($morphy); $object->statut = (int) $statut; $object->subscription = (int) $subscription; - $object->duration_value = $duration_value; - $object->duration_unit = $duration_unit; + $object->duration_value = $duration_value; + $object->duration_unit = $duration_unit; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (int) $vote; @@ -164,11 +164,11 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->oldcopy = clone $object; $object->label = trim($label); - $object->morphy = trim($morphy); + $object->morphy = trim($morphy); $object->statut = (int) $statut; $object->subscription = (int) $subscription; - $object->duration_value = $duration_value; - $object->duration_unit = $duration_unit; + $object->duration_value = $duration_value; + $object->duration_unit = $duration_unit; $object->note = trim($comment); $object->mail_valid = trim($mail_valid); $object->vote = (boolean) trim($vote); @@ -361,11 +361,11 @@ if ($action == 'create') print '