Fix error in api to get a member

This commit is contained in:
Laurent Destailleur 2017-11-25 13:30:08 +01:00
parent 7d3325c087
commit 5bc2b34386
2 changed files with 12 additions and 0 deletions

View File

@ -295,6 +295,17 @@ class Members extends DolibarrApi
// Remove the subscriptions because they are handled as a subresource.
unset($object->subscriptions);
unset($object->fk_incoterms);
unset($object->libelle_incoterms);
unset($object->location_incoterms);
unset($object->fk_delivery_address);
unset($object->shipping_method_id);
unset($object->total_ht);
unset($object->total_ttc);
unset($object->total_tva);
unset($object->total_localtax1);
unset($object->total_localtax2);
return $object;
}

View File

@ -172,6 +172,7 @@ class Subscription extends CommonObject
$resql = $this->db->query($sql);
if ($resql)
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$member=new Adherent($this->db);
$result=$member->fetch($this->fk_adherent);
$result=$member->update_end_date($user);